Okay, so I'm trying to make the following method save a string, but if called again it will just add the new string.. At the moment it overrides the old File.. so could you help me out?
Code:
public static void Write(String filename, String str){
BufferedWriter bufferedWriter = null;
try {
bufferedWriter = new BufferedWriter(new FileWriter(filename));
bufferedWriter.write(""+str);
bufferedWriter.newLine();
bufferedWriter.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}