Have you read the Scanner class's API doc? Do you have any
questions about the descriptions there of those two methods?
Please post your questions here. A token is a string of non
blank characters surrounded by white spaces. The current line
ends with a newline character. Can you post the program you are
having trouble with? What I need is to be able to enter several
words separated by space. Use the nextLine method to read all of
what is on the current line. It is possible for the current line
to only have a newline character which would return an empty
string.