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:
Verified
Q16: This variable controls the number of times
Q17: The increment operator is:
A) ++
B) --
C) *=
D)
Q18: This is a value that signals when
Q19: If you are using a block of
Q20: What will be the value of x
Q22: When using the PrintWriter class, which of
Q24: What will be the value of x
Q25: Before entering a loop to compute a
Q26: This type of loop is ideal in
Q52: In the following code, what values could
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