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
what state does a thread enter when it terminates its processing? : Java thread
How do you declare a variable?
How big is a 64 bit float?
Which eclipse is best for java?
Explain inheritance in java?
Is it possible to override private or static method in java?
Can a abstract class be declared final?
can rmi and corba based applications interact ?
What is stringjoiner ?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
What is meant by JVM? Is JVM platform independent or not?
How is garbage collection controlled?
Does java set allow duplicates?
Why do we need wrapper classes?
what is the difference between the methods sleep() and wait()? : Java thread