Solved

Consider the Following Code Snippet

Question 20

Multiple Choice

Consider the following code snippet:
PrintWriter out = new PrintWriter("output.txt") ;
If a file named "output.txt" already exists, which of the following statements about the PrintWriter object is correct?


A) An exception will occur.
B) Existing data will be deleted before data are added to the file.
C) A new file named "output_1.txt" will be created and used.
D) Data will be added at the end of the file.

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