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
Difference between arraylist and vector.
What is difference between fileinputstream and filereader in java?
What is data object example?
What does || || mean in math?
What are the uses of synchronized keyword?
Can It is possible to synchronize the constructor of a Java Class?
How many bytes is 255 characters?
How a variable is stored in memory?
How to use arraylist in java netbeans?
Explain the public class modifier?
What is the purpose of static methods and variables?
What is static method with example?
What are packages in java?
When should the method invokelater() be used?
Is main is a keyword?