Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get number of lines in a file java

BufferedReader reader = new BufferedReader(new FileReader("file.txt"));
int lines = 0;
while (reader.readLine() != null) lines++;
reader.close();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #number #lines #file #java
ADD COMMENT
Topic
Name
9+6 =