Trương Duy
New member
How do you count the number of lines in a text file Java?
Answer
Java – Count number of lines in a file
Answer
Java – Count number of lines in a file
- Open the file.
- Read line by line, and increases count + 1 each line.
- Close the file.
- Read the count.