Ask Question
16 June, 09:27

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

+5
Answers (1)
  1. 16 June, 09:58
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers