Reading lines in a file, but not terminating
Hello, I did a code to iterate through a text file. I am doing it with Iterator<String>. The problem is when I run the code it doesnt terminate and shows mw new line each time. Normally also the lines that should be shown are shown, but I dont know where this new lines come, if my file has only a few.