Hello, how would I go about writing to a .txt file but not rewriting the whole thing. So in other words how can i set it so im just adding text to the text already in the file?
any help would be appreciated!
I want each deposit to be added to the statement.txt file as one full statement off all activity but i just keep rewriting over the file wit one line... Any one care to help me?Code:
System.out.println("** Please enter your money now **");
TotalBalance = TotalBalance + depAmount;
PrintWriter outputFile = new PrintWriter("Statement.txt");
outputFile.println(getDate() + " " + getTime() + " " + "Deposit €" + depAmount);
System.out.println("\nError - You can only deposit in multiples of 10");