Ask Question

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

+4
Answers (1)
  1. 25 May, 05:59
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers