Question: If the data.dat file already exists, what will happen when the following statement is executed? FileWriter fwriter = new FileWriter ( data . dat
If the data.dat file already exists, what will happen when the following statement is executed?
FileWriter fwriter new FileWriterdatadat";
The new data written out will be appended to the file
An IOException will be thrown
The file will be erased and replaced with the new file
A compiler error will occur
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
