java.lang.ObjectWordScanner
public class WordScanner
Scans a word at a time from a named file
Constructor Summary | |
---|---|
WordScanner(java.lang.String fileName)
Constructor for objects of class WordScanner |
Method Summary | |
---|---|
boolean |
hasNextWord()
Returns true if there is another word in the Scanner |
java.lang.String |
nextWord()
Finds and returns the next token from the Scanner |
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordScanner(java.lang.String fileName)
fileName
- The name of the file to scanMethod Detail |
---|
public boolean hasNextWord()
public java.lang.String nextWord()