This program is supposed to take a text file, and search for a certain
string entered by the user, and come up with the strings line location and column location. When I run the program I keep getting this error at the command promt. I know for a fact the string I was searching for is in the text file. Any advice?
Error:
Please enter the file's location:
c:\java\caffeine.txt
Please enter the string you would like to locate:
coffee c:\java\caffeine.txt coffee
There were matches at:
Exception in
thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:232)
at StringMatch.main(StringMatch.java:58)
Press any key to continue . . .