摘要: java中的IO整理【案例1】创建一个新文件?1234567891011importjava.io.*;classhello{publicstaticvoidmain(String[] args) {File f=newFile("D:\\hello.txt");try{f.createNewFile();}catch(Exception e) {e.printStackTrace();}}}【运行结果】:程序运行之后,在d盘下会有一个名字为hello.txt的文件。【案例2】File类的两个常量?1234567importjava.io.*;classhello{publ 阅读全文
posted @ 2013-08-15 13:38 菜鸟V 阅读(163) 评论(0) 推荐(0) 编辑