Como verificar as linhas em um scanner Java de arquivo
int count = 0;
while (scanner.hasNextLine()) {
count++;
scanner.nextLine();
}
Magnificent Mockingbird
int count = 0;
while (scanner.hasNextLine()) {
count++;
scanner.nextLine();
}