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
Select the correct answer.
Anit [1.1K]

Answer: Steady OR Flashing

Explanation: If you are talking about the internet connection / power received lines One light should be Solid or "Steady" and the other usually green light will be flashing indicating that data is being transferred. Beware that just because the Orange light is Steady that does not mean that the internet is working that just means that it sees its connected.

4 0
3 years ago
Read 2 more answers
Este tipo de software sirve para controlar e interactuar con el sistema operativo, proporcionando control sobre el hardware y da
attashe74 [19]

Answer: c

Explanation:

4 0
3 years ago
By default, PowerPoint ends a slide show with a black slide. <br> a. True<br> b. False
Dmitry [639]
True . Because Press " ESC " To Exit Off Of Slide . 
5 0
4 years ago
Read 2 more answers
When students have computer trouble they usually are expected to
Kitty [74]

Answer: A) Make any simple fixes on their own.

5 0
3 years ago
Read 2 more answers
How do you see the recent IT evolution (e.g. platforms, big data, Internet of Things, etc.) affect Internet security and privacy
torisob [31]

Answer:

Answered below

Explanation:

With the evolution and growth of technology, and as we are increasingly having our everyday lives dependent on technology, there arise problems that shouldn't be ignored.

Security of people's personal data and information is of paramount importance. Access to personal information and the sale of these information to companies without the owner's permission is a breach of privacy and one of the challenges we face today.

With the growth of data, there are newer threats and attacks on software security systems to steal these data and therefore there's a need for everyday assessment and improvement in security of data.

3 0
3 years ago
Other questions:
  • Your boss calls you from his home to use the vpn connection you configured for him on his laptop. he has traditionally depended
    6·1 answer
  • When creating a software package, the software must be designed, the code must be written, and then the code must be tested. Thi
    6·1 answer
  • A disadvantage of creating a website with tables, without CSS is
    15·2 answers
  • ____ is another term for document properties.
    12·1 answer
  • Converting raw data into a more meaningful form is called:
    6·1 answer
  • .In Python, comments begin with the comment marker and continue ______.
    14·1 answer
  • I have a question about a hotel tv: So I’ve brought my Nintendo Switch and my dock and plugged it in to the tv. Everything seems
    13·1 answer
  • Which job role requires you to create user guides for computer products and services?
    11·1 answer
  • Why is it easier to spot a syntax error than a logical error?​
    10·2 answers
  • What was one effect of better printing methods during the Ming Dynasty? Updated trade routes A new merchant class Increased lite
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!