1:import java.io.BufferedWriter;
import java.io.FileWriter;
2: FileWriter fw = new FileWriter("C:/test/result.txt");
BufferedWriter bw = new BufferedWriter(fw);
然后写入bw.write("需要写入的数据!");
最近关闭流,即:fw.close();bw.close();
1:import java.io.BufferedWriter;
import java.io.FileWriter;
2: FileWriter fw = new FileWriter("C:/test/result.txt");
BufferedWriter bw = new BufferedWriter(fw);
然后写入bw.write("需要写入的数据!");
最近关闭流,即:fw.close();bw.close();