Solved

Which of the Following Will Open a File Named MyFile

Question 30

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