Thread: Problem...
View Single Post
  #1 (permalink)  
Old 11-08-2007, 11:05 PM
jpnym15 jpnym15 is offline
Member
 
Join Date: Nov 2007
Posts: 19
jpnym15 is on a distinguished road
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
Reply With Quote
Sponsored Links