+ 1
How can I write in a file that already exists without overwriting it?
In Java, if a file already exists, how can I write in it without losing what is already written? For example, if I have a file with one line written, how can I start from the second line?
4 odpowiedzi
+ 8
open > append > close.
https://stackoverflow.com/questions/1625234/how-to-append-text-to-an-existing-file-in-java
+ 1
Done it! Now it is working! Thank you guys!
0
Append method.
0
Well, I guess I'm doing it right, but it is returning an error:
FileWrite.java:67: error: cannot find symbol
flout.close();
^
symbol: variable flout
location: class FileWrite
1 error
Here is the code: https://code.sololearn.com/c3R5NuIgmmzV