Answer:
Answer:
BufferedWriter salesdata = new BufferedWriter(new FileWriter("out.dat", true);.
Step-by-step explanation:
The statement BufferedWriter salesdata = new BufferedWriter(new FileWriter("out.dat", true); can be used to create a file object that will append data to an existing file.
Here, BufferedWriter class is used to create text from an output stream.
Here, FileWriter is used to create the file from the text. The constructor for FileWriter is FileWriter (String filename, boolean append).
Here, filename is string ("out.dat") is provided and the append is boolean can be either true (if the text has to be appended at the end of the file) or false (if the text hasn't to be appended at the end of the file).
So, option (b) is correct.
Option (a) is not correct as it indicates the text shouldn't be appended at the end of the file as the boolean is false.
Option (c) is not correct as it doesn't mean to append as there is no boolean true indicated in the constructor.
Option (d) is not correct as there is not such kind of syntax.
Click to let others know, how helpful is it
The