//----------------------------------------------------覆蓋原有

import java.io.*;

public class A{
public static void main(String [] args) throws Exception{

FileWriter fw = new FileWriter("gg.txt");
fw.write("你好!!");
fw.close();
}
}

//---------------------------------------------------加在尾端

import java.io.*;

public class A{
public static void main(String [] args) throws Exception{

FileWriter fw = new FileWriter("gg.txt", true);
fw.write("你好!!");
fw.close();
}
}

arrow
arrow
    全站熱搜

    黃彥霖 發表在 痞客邦 留言(0) 人氣()