StringDown - per line-public static void main(String args...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Author: Lewis and Loftus // // Solution to Programming Project 3.5 //******************************************************************** / import java.util.Scanner; i public class StringDown { //----------------------------------------------------------------- // Reads a string from the user and prints it one character
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // per line. //-----------------------------------------------------------------public static void main (String args) { String str; System.out.println ("Enter a string of characters:"); Scanner sc = new Scanner(; str = sc.nextLine(); for (int index=0; index < str.length(); index++) System.out.println (str.charAt(index)); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online