import java.io.*;
public class FileTest{
public FileTest(){
}
try{
File f = new File("d:\test.txt");
FileReader fr = new FileReader(f);
BufferedReader br = new BufferedReader(fr);
String line = br.readLine();
while(line != null){
System.out.println(line + "\n");
line = br.readLine();
}
}catch(Exception ex){
System.err.println(ex);
}
}