Question: When use the following statement to open a binary file for output, what will happen if the file already exist? FileOutputstream fstream = new EileOutputStream

When use the following statement to open a binary file for output, what will happen if the file already exist?
FileOutputstream fstream = new EileOutputStream("MyInfo.dat", true);
The existing file will be erased
A different file name will be automatically chosen for the output
An exception will be thrown
Output will be appended to the end of the existing file
When use the following statement to open a binary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!