1,相关的方法:

image.png

  1. 追加的形式写数据:(append :true)

    1. public class Text01 {
    2. public static void main(String[] args) throws IOException {
    3. //设置apprnd为true
    4. FileWriter fw = new FileWriter("G:\\abc.txt",true);
    5. fw.write("daddd");
    6. fw.close();
    7. }
    8. }