|
Problem...
import java.util.*;
public class SentenceSplit
{
public static void main (String[] args)
{
Scanner in = new Scanner (System.in);
String userInput;
String output;
int stringsize;
System.out.println("Enter a sentence");
userInput = in.nextLine();
stringsize = userInput.length();
output = userInput.substring(stringsize/2);
System.out.println(output);
}
}
That is my program, and it works fine and everything...but what would i need to do in order for each letter of the sentence to go on its own line?
ie. H
e
l
l
o
|