Closed dejunnn closed 4 years ago
Compare how other teams use the Scanner object to the way you guys use it.
Oh, I think I managed to figure out the issue already. I honestly have no idea what I did to fix it but I messed around with it a little and now it works. Thanks a bunch! :)
Oh, I think I managed to figure out the issue already. I honestly have no idea what I did to fix it but I messed around with it a little and now it works. Thanks a bunch! :)
The Scanner object should be created only once and kept in a static variable. In your code you created a new Scanner for each input. The very first Scanner swallows all the inputs from the file, and the second one throws 'No lines found' error.
The following error occurs when I enter more than 1 line in input.txt. Im not sure why this is happening and what I can do to solve it.
I tried methods recommended by other forum posts such as deleting old jar files and running gradlew clean but nothing seems to work. Would really appreciate any help. Thanks!!!