用构造方法FileWriter fileWriter=new FileWriter("c:\\Result.txt", true); // true代表追加同理BufferedWriter writer = new BufferedWriter(new FileWriter(new File("c:\\Result.txt"), true));