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
What do you mean by a JVM?
Can inner class extend any class?
What is difference between overloading and overriding in java?
When will we prefer to use set and list in java and why?
What is the r character?
What is null object in java?
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?
What is an exception in java?
What is natural ordering in java?
What are user defined exceptions?
Can we serialize static variables in java?
What is a parameter used for?
What is the purpose of garbage collection in java?
Explain about assignment statement?
What is string value?