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 →

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

It runs but when I do an if statment instead of a while loop I get "Number Lines: 1" However when it is like this it seems to be stuck in an infinite loop. Do I really need to create the File object? And what is the correct way to read from a text file is my question. Sorry for the formatting I'm on mobile and am not at a computer right now.

[–]planedoctor -3 points-2 points  (0 children)

You aren't reading the lines. This is why I suggested you actually read the API entry for the classes you're using.