helloo,
hello can you help me please i want to write to a file using bufferedwriter and bufferedreader but the problem is that i don't know how to use it i get an error please help me,hoping for your positive responds...
import java.io.*;
import java.util.*;
class Writefile
{
public static void main(String []args)throws Exception
{
String name;
BufferedWriter bw = new BufferedWriter(new FileWriter(("write.txt")));
BufferedReader br = new BufferedReader(new BufferedWriter((System.in)));
System.out.println("Write a name");
name = br.readLine();
bw.write(name);
bw.close();
}
}