Chciałbym zapisywać imie oraz liczbe lat podawanych przez uzytkownika, ale jak np. używam FileWriter to nadpisuje mi ten wczesniejszy plik ktory stworzylem.
0
1
FileWriter fw = new FileWriter("filename", true);
Z dokumentacji:
public FileWriter(File file,
boolean append)
throws IOException
Constructs a FileWriter object given a File object. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.