Example Of BufferedWriter And BufferedReader

package fileionavigationexample;
/*All Belongs to java.io package
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
*/
import java.io.*;

public class BufferedWriterAndBufferedReader extends IOException {
public static void main(String[] args) throws IOException{
File file = new File(“C:\Users\KUNDAN\Documents\JavaNotes.txt”);

FileWriter fw = new FileWriter(file);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(“Features Of Java Programming Language:”);
bw.newLine();
bw.write(“1) Java is an Object Oriented Programming Language also called OOPS Language.”);
bw.newLine();
bw.write(“2) Java language is Highly Secured. Means It provides Third party security.”);
bw.newLine();
bw.write(“3) Java language is Robust. Means 24/7 it can be accesed by the user.”);
bw.newLine();
bw.write(“4) Java language is an scale oriented programming language. Means we can restrict an application for the number of users at a time.”);

bw.close();
fw.close();

FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
String s = null;

while((s = br.readLine()) != null){
System.out.println(s);
}
fr.close();
br.close();

}
}