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 is the java project architecture?
What do you mean Abstraction in java?
What will be the default values of all the elements of an array defined as an instance variable?
What will happen if static modifier is removed from the signature of the main method?
What is a wrapper method?
What are the differences between string and stringbuffer?
How do you execute a thread in java?
Is array a class?
What is the meaning of I ++ in java?
What are the kinds of polymorphism?
What is close method? How it's different from Finalize & Dispose?
Is 9 a prime number?
Does java support multiple inheritance or not?
What are the different types of inner classes?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent