The hasNext() method tests if there is one line available to be read. The code then tries to read 3 lines without testing if there are 2 more lines available after the one.
The code should check...
Type: Posts; User: Norm
The hasNext() method tests if there is one line available to be read. The code then tries to read 3 lines without testing if there are 2 more lines available after the one.
The code should check...
What line does the error happen on? Please post the full text of the error message.
The NoSuchElementException error is from a Scanner method that tried to read and didn't find anything.
One...