Can I make this program that extracts text data from a file (size in MBs) even better performance-wise? I need to reduce the execution time.
import java.io.*;
public class ReadData {
public static void main(String[] args) {
FileReader input = null;
BufferedReader br = null;
try {
input = new FileReader("C:/Projects/Test/HPCamDrv.log");
br = new BufferedReader(input);
String str;
while ((str = br.readLine()) != null) {
System.out.println(str);
}
}
catch (IOException e) {
e.printStackTrace();
}
finally {
try {
input.close();
br.close();
}
catch (IOException x) {
x.printStackTrace();
}
}
}
}