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
Define an abstract class with reference to java.
Can we sort arraylist in java?
Can you add null to a list java?
What is scope & storage allocation of global and extern variables? Explain with an example
What is hash table in java?
How do I find and replace in word?
What are disadvantages of java?
Is string an object?
List some features of the abstract class.
Can a class extend more than one class?
What is java util hashmap?
What is the driver class?
Can anonymous class have constructor?
What is the difference between length and length () in java?
What is an escape character in java?