Solved

The File Data

Question 88

Short Answer

The file data.txt contains ABC before the code below is executed: What does data.txt contain after the code below is executed, assuming that the file is found?
try
{
FileOutputStream fos = new FileOutputStream( "data.txt", true );
PrintWriter pw = new PrintWriter( fos );
pw.println( "\nDEF" );
pw.close( );
}
catch( FileNotFoundException fnfe )
{
System.out.println( "GHI" );
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents