I'm having issues with my bottom loop trying to read in a large *.txt* file but how can I do a check to see if its at the end of the document?
Oceas Anderson wrote:Thank you, and that did work.
Stuart A. Burkett wrote:
Oceas Anderson wrote:Thank you, and that did work.
No. Get rid of the for loop. The first time in the for loop, the while loop will ensure that the whole file is read. The next 9999 through the loop will then just confirm that there is nothing left to read from the file.
If the file may be bigger than 10000 lines and you only want to read the first 10000, then you need to modify your while loop to inclde that check - your code at the moment doesn't do that.
Oceas Anderson wrote:I'm needing to do a encryption for each letter but plaintText.input.nextChar() doesn't seem to exist the ("nextChar()") part.
I added code tags, and removed some unnecessary balnk lines, and doesn't the code look betterStephan van Hulst wrote: . . . You will be more likely to attract aid if you UseCodeTags. Edit your post and try it now! . . .