+ 6
File Editing In Java
I have a Program That Takes User Input as A String And Adds That Data To A Text File. However When I Use The File Writer The Initial Contents of The File Are Overridden By The New String. Is There A Way To Add Data To The File Without Previous Data Being Sweeped Off ?
2 odpowiedzi
+ 3
public FileWriter(String fileName, boolean append)
if append is new content is added at the end
+ 4
Works 😊