java scanner doesn't find lines in file code example
Example: how to check the lines in a file java scanner
int count = 0;
while (scanner.hasNextLine()) {
count++;
scanner.nextLine();
}
int count = 0;
while (scanner.hasNextLine()) {
count++;
scanner.nextLine();
}