J
Jo
How do I get the number of lines in a text file?
Jo said:How do I get the number of lines in a text file?
How do I get the number of lines in a text file?
Collin VanDyck said:Try creating a LineNumberReader and read the entire file line by line and
keep count.
Jo said:I did this but when I use LineNumberReader it seems to make
BufferedReader.readLine() return null. Any ideas how I can "reset" the
BufferedReader so it goes back to the start of the file (and it's not the
reset() method).
remember to close the old reader.A Reader is a one-shot thing. To start over, you need to create a new
FileReader to read from _scores_file.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.