Quick query here guys - I have a program that reads from a file and counts the number of lines in the code. This works fine but when I go to print the contents of the file to the screen or to a Dialog box the number of lines that the code seems to counts halves.
Here is the block of code for the reading:
while( ( myFile.readLine() ) != null )
{
// System.out.println( myFile.readLine() );
fileLength++;
}
When i uncomment the "out.println" line the fileLength is affected and it also only reads and prints to the screen every even numbered line. Why would this be?