import java.io.FileWriter;
import java.io.IOException;
public class Test04 {
public static void main(String[] args) throws IOException {
//为什么使用flush
FileWriter fw=new FileWriter("D:\\新建文件夹\\bbb.txt");
String words="*************";
fw.write(words);
fw.flush();
System.out.println("写入成功");
}
}
时间: 2024-09-29 23:07:06