/*
续写和换行
*/
public class demo09 {
public static void main(String[] args) throws IOException {
FileWriter fw = new FileWriter("D:\\IdeaProjects\\basic-code\\aaaa\\qaq.txt",true);//加上appen:true
// 续写
for (int i = 0; i < 10; i++) {
fw.write("hello"+i+"\r\n"); //windows换行 \r\n linux:/n mac:/r
}
fw.close();
}
}