I\'m having problems with using the BufferedReader
I want to print the 6 lines of a text file:
public class Reader {
public static void main(String[
Maybe you mean this:
public class Reader {
public static void main(String[]args) throws IOException{
FileReader in = new FileReader("C:/test.txt");
BufferedReader br = new BufferedReader(in);
String line = br.readLine();
while (line!=null) {
System.out.println(line);
line = br.readLine();
}
in.close();
}