Answers for "how to count how many lines in a file java"

0

how to count lines from txt java

Path path = Paths.get(fileName);
long lines = 0;
lines = Files.lines(path).count();
System.out.println(lines);
Posted by: Guest on February-23-2022

Code answers related to "how to count how many lines in a file java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language