Monday, February 22, 2010

string.split()

String sentence = "This is a sentence.";
String[] words = sentence.split(" ");

for (String word : words)
{
System.out.println(word);
}

No comments:

Post a Comment