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");

b. FileWriter fwriter = new FileWriter("MyFile.txt", true);
PrintWriter outFile = new PrintWriter(fwriter);

Computer Science & Information Technology

You might also like to view...

?A simple way to insert a table into a Word document is to hit the 'view' button.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Describe the problem of rogue access points.

What will be an ideal response?

Computer Science & Information Technology