Solved

Consider the Following Code Snippet

Question 35

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