Which of the following statements opens a file named MyFile.txt and allows you to append data to its existing contents?
A) FileWriter fwriter = new FileWriter("MyFile.txt") ;
PrintWriter outFile = new PrintWriter(fwriter) ;
B) FileWriter fwriter = new FileWriter("MyFile.txt", true) ;
PrintWriter outFile = new PrintWriter(fwriter) ;
C) PrintWriter outfile = new PrintWriter("MyFile.txt", true) ;
D) PrintWriter outfile = new PrintWriter(true, "MyFile.txt") ;
Correct Answer:
Verified
Q34: How many times will the following do-while
Q35: Assume that inputFile references a Scanner object
Q36: What will be printed after the following
Q37: The _ loop is ideal in situations
Q38: How many times will the following for
Q40: Assuming that inputFile references a Scanner object
Q41: What will be the values of x
Q42: What will be the values of x
Q43: Which is a control structure that causes
Q44: Select all that apply. Which method of
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