Please look through the below code,
// A.java
File file=new File("blah.txt");
FileWriter fwriter=new FileWriter(file);
PrintWriter pwriter=new PrintWriter(fwriter);
//B.java
File file=new File("blah.txt");
FileWriter fwriter=new FileWriter(file);
BufferedWriter bwriter=new BufferedWriter(bwriter);
What is the difference between these two files? And when do we need to go for PrintWriter and BufferedReader/BufferedWriter?