Java读文件写文件txt

上传:清华规划院 浏览: 15 推荐: 0 文件:PDF 大小:29.68KB 上传时间:2021-01-16 18:37:33 版权申诉
1. 写文件 String filePath = System.getProperty(user.dir)+File.separator+files;//当前项目的运行目录/files,File.separator根据系统的不同,路径的分隔符也不同 String fileName = test.txt; File pathFile = new File(filePath); BufferedWriter out = null; //1:创建文件夹 if (!pathFile.ex
上传资源
用户评论