Solved

The File Data

Question 41

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