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 do you understand by synchronization?
How is it possible in java programming for two string objects with identical values not to be equal under the == operator?
What restrictions are placed on method overloading?
What is the maximum length of a url?
what is the volatile modifier for? : Java thread
What is externalizable interface?
What access modifiers can be used for class ?
What is java util concurrentmodificationexception?
What is java in detail?
Should a main method be compulsorily declared in all java classes?
What is not thread safe?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
If try block is successfully executed, Then Is Finally block executed?
What is the difference between post and put?
What is private static in java?