I want to know how many lines are in a File I open:
fc is a JFileChooser.
fileDispatch is a File.
iDispatchFileLineCount is an int.
I guess "length()" is the count of characters in the file. It's close, anyway (298, whereas MSWord says it's 260).Code:
fileDispatch = fc.getSelectedFile();
iDispatchFileLineCount = (int)fileDispatch.length();
How do I get the count of lines in the File? Count the instances of "crlf" or something?