String path = "";
String str = ""; FileWriter writer; try { path = ""; path = "c:/test/test.txt";//目录 writer = new FileWriter(path); writer.write("123"); //到达指定目录writer.close();
} catch (IOException e2) { e2.printStackTrace(); }本文共 229 字,大约阅读时间需要 1 分钟。
String path = "";
String str = ""; FileWriter writer; try { path = ""; path = "c:/test/test.txt";//目录 writer = new FileWriter(path); writer.write("123"); //到达指定目录writer.close();
} catch (IOException e2) { e2.printStackTrace(); }转载地址:http://patbo.baihongyu.com/