Java text file append

Description

Java text file append



import java.io.BufferedWriter;
import java.io.FileWriter;

public class Main {
  public static void main(String[] argv) throws Exception {
    BufferedWriter out = new BufferedWriter(new FileWriter("Main.java", true));
    out.write("demo from demo2s.com");
    out.close();/*from  w  w w . j  a  va  2 s.c om*/
    
    System.out.println("done");
  }
}



PreviousNext

Related