Hello all,
This probably has a simple answer. I'm taking standard in from the command prompt (all integers) until I get an EOF. These integers are taken in via stringtokenizer. Trouble is I'm not sure what to look for to break my while look (which continually looks for tokens). I thought it might be null of "" but neither works. When I type in several ints, then leave the last blank and hit enter, I receive a "NoSuchElementException" error. I also get a different error if I use ctrl-D to send an EOF character (NumberFormatException: For Input String "(a diamond symbol?").
Can anyone toss me a clue here?
Thanks,
Jisoo23
This probably has a simple answer. I'm taking standard in from the command prompt (all integers) until I get an EOF. These integers are taken in via stringtokenizer. Trouble is I'm not sure what to look for to break my while look (which continually looks for tokens). I thought it might be null of "" but neither works. When I type in several ints, then leave the last blank and hit enter, I receive a "NoSuchElementException" error. I also get a different error if I use ctrl-D to send an EOF character (NumberFormatException: For Input String "(a diamond symbol?").
Can anyone toss me a clue here?
Thanks,
Jisoo23