hello every one i am haveing problem in code i.e whenever i try to write in file it overwrite tthe previous one.I am using this code
File f=new File("c:\\paul.txt");
//f.createNewFile();
BufferedWriter br = new BufferedWriter(new FileWriter(f));
BufferedReader br1=new BufferedReader (new InputStreamReader(System.in));
FileReader fr=new FileReader(f);
// FileWriter frt=new FileWriter(f);
// BufferedReader brz=new BufferedReader(fr);
String text;
System.out.println("Enter value");
text= br1.readLine();
// br.newLine();
// br.append(text);
br.newLine();
br.write(text);
br.flush();
// frt.write(text);
br.close();