Hi everyone.I want to open a .txt file and if the name already exists,i want to add data after the existing data.
Here is the code'
below the "else" i want to open the existing file and NOT lost the writen data.
thanks in advance
java.io.FileWriter has a constructor that allows you to open a file for appending.
It will try to create a file for you if it does not exist.
If the file exists, it will append data at the end.