Answers for "how to read string of entire line in java using scanner"

1

how to check the lines in a file java scanner

int count = 0;
while (scanner.hasNextLine()) {
    count++;
    scanner.nextLine();
}
Posted by: Guest on April-01-2020
2

java read next line

Scanner scanner = new Scanner(new File("filename"));
while (scanner.hasNextLine()) {
   String line = scanner.nextLine();
   // process the line
}
Posted by: Guest on May-06-2020

Code answers related to "how to read string of entire line in java using scanner"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language