Answer Posted / srinu
Stream Tokenizer from java.util package this class
implements Enumeration interface.This class break the string
into tokens with take parameter as delimeter
EX:-
import java.util.*;
public class Strtok
{
public static void main(String [] args)
{
String Demo = "This is a string that we want to tokenize";
StringTokenizer Tok = new StringTokenizer(Demo);
int n=0;
while (Tok.hasMoreElements())
System.out.println("" + ++n +": "+Tok.nextElement());
}
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
how to open and edit XML file in Weblogic???
Is java a super set of javascript?
What are the differences between c++ and java?
What is the difference between a scrollbar and a scrollpane?
What do you mean by an interface in java?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
Difference between object and reference?
What does the “static” keyword mean?
Explain about transient variables in java?
List implementations of list interface?
What is the difference between replace and replace all?
Are primitives objects?
What is the function of compareto in java?
What is append in java?
Explain what access modifiers can be used for variables?