Hello Guys.
I have written the code to scann display every line of the text file, but the problem i that I do not know how do we do the End Of File in Java, Na i am using "null", therefore it becomes the endless loop.
Any sort of information will be appriciated.
the following is the code.
-------------------------------------
import java.io.*;
class ReadOne
{
public static void main(String[] args)throws IOException
{


FileReader f1 = new FileReader("E:\\Harbir\\ep04ext.txt");
BufferedReader file = new BufferedReader(f1);


String text;
int i=0;



while(file.readLine()!= null)
{
i++; // counting the number of lines
text=file.readLine();
System.out.println("\n "+text);
}
System.out.println("\n The value of I is: "+i);

}
}
--------------------------------------------------------------