1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Snowcat [4.5K]
4 years ago
9

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

Computers and Technology
2 answers:
Temka [501]4 years ago
8 0

Answer:

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

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.

Charra [1.4K]4 years ago
7 0

Answer:

Answer:

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

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

You might be interested in
The ABC Manufacturing company has a completely automated application system. The system, however, resides on index files and doe
Leni [432]

Answer:

Please see the attached file for complete Answer.

Explanation:

Download pdf
6 0
3 years ago
Read 2 more answers
WHAT ARE THE CONTENTS THAT WE SHOULD USE FOR THE PRESENTATION OF DIGITAL WORLD
Lana71 [14]

Answer:

Introduction

Importance

Advantages

Disadvantages

Effects

Conclusion

8 0
3 years ago
A. Calculate the diffusion coefficient for magnesium in aluminum at 450°C.
SIZIF [17.4K]

Answer:

a) D = 4.88 * 10^(-14) m^2 / s

b)   <em>t </em>= 1.1 hr

Solution:

a) Magnesium in Aluminum diffusion:

D = Do * exp(-Qd / RT)

  =  (1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15)

  = 4.88 * 10^(-14) m^2 / s

D = 4.88 * 10^(-14) m^2 / s

b) The composition remains same at say the distance Xo:

(Cx - Co) / (Cs - Co) = Constant

Xo^2 / D_{550} * <em>t </em>= Xo^2 / D_{450} * 15

D_{550} * <em>t </em>= D_{450} * 15

(1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15) * <em>t</em>

(4.88 * 10^(-14) m^2 / s) * 15

by, solving for <em>t </em>we get:

 <em>t </em>= 1.1 hr

So, the time required is 1.1 hr.

5 0
3 years ago
Hi guys how are you i have a question why does people delete questions and answer from brainly and where is the delete option?
Sphinxa [80]
There is no delete option sorry
3 0
3 years ago
Read 2 more answers
100 POINTS!!!
aleksklad [387]

Answer:

Hmm.. Try researching, I'm sure you'll find something there..

7 0
3 years ago
Other questions:
  • Can the redirection shell metacharacter be used to redirect between a command and another command?
    8·1 answer
  • What inventor patented the first America movie projector
    13·2 answers
  • How can you create the first row of the table as the header of the table
    15·2 answers
  • Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
    7·1 answer
  • If I make a Zoom Meeting, would you join it?
    7·2 answers
  • Is the color grade of black or white higher?
    11·2 answers
  • .13 LAB: Library book sorting Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary linkedL
    14·1 answer
  • Anyone know how to fix black screen of death on computer​
    6·1 answer
  • What are the types of micro computer?​
    14·2 answers
  • Write the pseudocode for a program that will process attendance records of CA students. The students attend college five days a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!