Solved

Which of the Following Will Open a File Named MyFile

Question 21

Multiple Choice

Which of the following will open a file named MyFile.txt and allow you to append data to its existing contents?


A) FileWriter fwriter = new FileWriter("MyFile.txt", true) ;
PrintWriter outFile = new PrintWriter(fwriter) ;
B) FileWriter fwriter = new FileWriter("MyFile.txt") ;
PrintWriter outFile = new PrintWriter(fwriter) ;
C) PrintWriter outfile = new PrintWriter("MyFile.txt", true) ;
D) PrintWriter outfile = new PrintWriter(true, "MyFile.txt") ;

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