package com.qinb.test; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class fileWirter { public static void main(String[] args) { String path = "d:/fileTest"; File f = new File(path); if(!f.exists()){ f.mkdir(); } String fileName = "test.java"; File file = new File(f,fileName); if(!file.exists()){ try{ file.createNewFile(); System.out.println("文件创建成功"); }catch(IOException e){ e.printStackTrace(); } } try{ BufferedWriter out = new BufferedWriter(new FileWriter(file,true)); out.write("\npackage com.qinb.entiy\n"); out.newLine(); out.write("\t\tafasfa"); out.close(); }catch(Exception e){ e.printStackTrace(); } } }

luqb890913 LV12
2020年9月30日
csj1014143230 LV10
2020年5月6日
xuyongff LV24
2019年11月4日
piress LV1
2019年7月5日
ou273645 LV1
2018年12月8日
mengfanyun LV9
2018年12月3日
1247879478 LV8
2018年11月21日
aihelloworld110 LV1
2018年9月2日
1203876671 LV1
2018年8月1日
yyh123 LV1
2018年7月31日