java IO异常处理
程序员文章站
2022-06-22 15:54:41
public class FileWriterDemo { public static void main(String[] args) { FileWriter fw = null; try { fw = new FileWriter("s:\\demo.txt"); fw.write("abcd ......
public class filewriterdemo { public static void main(string[] args) { filewriter fw = null; try { fw = new filewriter("s:\\demo.txt"); fw.write("abcde"); } catch (ioexception e) { system.out.println(e.tostring()); } finally { try { if (fw != null) fw.close(); } catch (ioexception e) { e.printstacktrace(); } } } }
上一篇: 扫地机器人大比拼 谁是最佳家庭好帮手?
下一篇: 小朋友组装机器人体验科技魅力