Which of the following statements about using the PrintWriter object is correct?
A) If the output file does not exist, a FileNotFoundException will occur.
B) If the output file already exists, the new data will be appended to the end of the file.
C) If the output file does not exist, an IllegalArgumentException will occur.
D) If the output file already exists, the existing data will be discarded before new data are written into the file.
Correct Answer:
Verified
Q10: Which of the following statements reflects the
Q11: Consider the following code snippet:
public static void
Q12: Select an expression to complete the following
Q13: Which of the following statements about reading
Q14: Which of the following statements about a
Q16: Consider the following code snippet:
File inputFile =
Q17: Insert the missing code in the following
Q18: Which of the following is the correct
Q19: Insert the missing code in the following
Q20: Consider the following code snippet:
PrintWriter out =
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents