Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to count lines from txt java

Path path = Paths.get(fileName);
long lines = 0;
lines = Files.lines(path).count();
System.out.println(lines);
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #count #lines #txt #java
ADD COMMENT
Topic
Name
2+6 =