append data to file in java code example
Example: append to file in java
File file = new File("append.txt");
FileWriter fr = new FileWriter(file, true); // parameter 'true' is for append mode
fr.write("data");
fr.close();
File file = new File("append.txt");
FileWriter fr = new FileWriter(file, true); // parameter 'true' is for append mode
fr.write("data");
fr.close();