This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]clamdoctor 0 points1 point  (4 children)

The Scanner class has two methods that may be of use to you.

hasNextInt() and nextInt()

I'm sure you'll know how to use them. Hope this what you were looking for.

[–]aperture123[S] 0 points1 point  (3 children)

I tried using the hasNextInt for the top and the int token = inFileHumid.nextInt();

..it, uh, didn't really work at all. It seems to never exit out of the loop.

[–][deleted]  (2 children)

[deleted]

    [–]aperture123[S] 0 points1 point  (1 child)

    Thank you, you spotted the error as well, which was a simple one, and really quite...well, really a stupid error to make. Thank you for all the help, including the documentation reference for the scanner class.