hey guys, how do i change the default of throws FileNotFoundException so that it would not automatically erase the contents in my desired output file.
my aim is to inFile() and outFile() the contents in the same location.
this:
Scanner inFile=new Scanner(new FileReader("vending_machine")); PrintWriter outFile=new PrintWriter("vending_machine");
my problem is the contents in the vending_machine text file automatically goes blank right after i run the program. So how should i change the default and change it to not automatically erasing the contents of the text file. Thanks!
Sorry for my horrible english and grammar. haha