Programming with Java, part 8
1.About BufferedReader classThis is a continuation of the previous file input. TheFileReader class is inefficient because it reads charactersfrom the file one by one. The java.io package provides aBufferedReader class that reads line by line from a file,so let's see how to use this class with the following program.----------------------- ReadTest2.java -------------------------------------import java.io.*;public class ReadTest2 { public static void main(String[] args) throws Exception { BufferedReader br = null; try { File file = new File("c:¥¥test¥¥sample.txt"); FileReader fr = new FileReader(file); br = new BufferedReader(fr); St
0