package IO;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class output {
public static void main(String[] args) throws IOException {
// 要输入的字符串
String str = "abc你好";
// 文件
File f = new File("d:\\output.txt");
// 定义字符输出流
FileWriter fw = new FileWriter(f);
// 输出
fw.write(str);
// 流关闭
fw.close();
System.out.println("运行成功");
}
}