Ask Question
4 January, 10:19

Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =

new BufferedWriter (new FileWriter ("out. dat", false);.

new BufferedWriter (new FileWriter ("out. dat", true);.

new BufferedWriter (new FileWriter ("out. dat");.

new BufferedWriter (new FileWriter ("out. dat", append);.

+2
Answers (1)
  1. 4 January, 11:41
    0
    new BufferedWriter (new FileWriter ("out. dat", true));

    Explanation:

    We can use the BufferedWriter and FileWriter classes to create a File object which will append data to an existing file. For this purpose we can use the following statement:

    BufferedWriter salesdata = new BufferedWriter (new FileWriter ("out. dat", true));

    This opens the file "out. dat" for writing in append mode and uses this FileWriter to create an instance of BufferedObject instance.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata = new BufferedWriter ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers