Of course, because for each loop turn, you still read two lines... Do you see the TWO calls to nextLine()
Remove one of them as shown below and see what happens it might help you understand.
...
Type: Posts; User: mariostg
Of course, because for each loop turn, you still read two lines... Do you see the TWO calls to nextLine()
Remove one of them as shown below and see what happens it might help you understand.
...
It is not the number of lines in your file being scanned that drives the number of loops. It's the conditions in the for loops. Well unless you have a break condition in the loops.
If the...
char characs = input.nextLine().charAt(0); //This read a line
String syms = input.nextLine(); //This reads another line
Given your input format, I would read a line, then split it in two using...