What is the Best way to determine the number of lines in a file to process in
Java....
These files have over 100,000 lines.....
I wanted to do a count so then i can calculate and show the percentage done processed.....
currently i do 2 passes at file...
I read every record to get a total line count.
Once i have this count....i re-read file again to process each record individually
Both passes are slow.....
But on FIRST PASS.....IS there a way to figure out how many lines my file has? Or a faster way to read them for count?(on first pass)
Thanks
Java Newbie