Home > DeveloperSection > Interviews > what is String Tokenizer?

Posted on    January-10-2011 12:00 AM

 Java Java 
Ratings:
 1 Answer(s)
  902  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    January-10-2011 1:00 AM

A StringTokenizer constructor takes a string to break into tokens and returns a StringTokenizer object for that string.

for example:
 StringTokenizer st = new StringTokenizer("check the class");
while (st.hasMoreTokens()) {
System.out.println(st.nextToken());
}

output:
check
the
class


Don't want to miss updates? Please click the below button!

Follow MindStick