Answer Posted / qim2010
The StreamTokenizer class can tokenizer a Reader into
tokens. For instance, in the string "Mary had a little lamb"
each word is a separate token.
We need to move through the tokens in the underlying Reader
by calling the nextToken() method in a loop. After each
call to nextToken() the StreamTokenizer has several fields
you can read to see what kind of token was read, it's value
etc. These fields are:
ttype The type of token read (word, number, end of line)
sval The string value of the token, if the token was a
string (word)
nval The number value of the token, if the token was a
number.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Can we pass a primitive type by reference in java? How
What is a jagged array in java?
What are the types of casting?
How is Object Oriented Programming different from Procedure Oriented Programming?
Can we sort hashmap in java?
What are default methods ?
How many characters is 16 bytes?
What best practices should you follow while writing multithreaded code in java?
Is empty list java?
What does bitwise or mean?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
Difference between comparator and comparable in java?
What do you mean by compiler?
What will be the output of round(3.7) and ceil(3.7)?
What are the ways in which a thread can enter the waiting state?