...
Scanner scan = new Scanner(System.in);
System.out.println("Input : ");
String t = scan.next();
FileWriter kirjutamine = new FileWriter("...");
BufferedWriter out = new BufferedWriter(writing);
out.write(t)
out.close();
...
if I write sometring to a file, then it will go to the first line. But if you run the program again, it writes new text on top of the previous text (on the first line). I want to do: if I insert something, then it goes to the next line. For instance:
after 1 input) text1
after 2 input) text1
text2
etc.
What should I change in the code? thank!
user721588
source
share