I'm fairly new to Java, so I need help with even the most basic things ever...
I need to design and implement an application that reads a string from the user and prints it one character per line using the while statement. Can someone please help me??
Edit: I'm working from the Java Software Solutions for AP Computer Science A 2nd Edition book. This problem is #3.5 from the programming projects section in Chapter 3. I have to figure out the length of the string the user inputs ( int length (); ??) and something to track what character I'm on ( charAt ??).
I have this so far (the comments are the requirements my teacher put in):
public class StringDown
public static void main (String args)
int count = 0;
Scanner scan = new Scanner (System.in);
System.out.println ("Welcome to StringDown! Input your string here: ");
//take in user string
String sentence = scan.nextLine();
//Find the number of characters in the string
int length ();
//condition is as long as there are characters left in the String
while ( )
//pull out that particular letter and println it