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
4vir4ik [10]
3 years ago
9

Which method can be used to write data to a text file opened with the BufferedWriter object outfile?

Computers and Technology
1 answer:
maksim [4K]3 years ago
7 0

Answer:

Option (d) outfile.write();

Explanation:

As the object created for the class BufferedWriter is outfile, outfile.write is the correct syntax for writing in a text file. Here, write is the method used for writing into a text file. The data present is written in the textfile. Here, the text file is opened before writing the text into the file. Option (d) is correct.

Option (a) outfile.newLine(); is used to separate the lines. This is used to break the existing lines into smaller lines. This can also be used to start a new line. Here, newLine() is the method.So, option (a) is not suitable.

Option (b) outfile.existLine(); This is not a valid syntax as there is no method called existLine() in the class BufferedWriter. So, this is a wrong option.

Option (c) Write(outfile); This is not a valid syntax for writing in a text file. This is a wrong option.

You might be interested in
What is a good rule of thumb for how much white space you should have in a flyer or poster
almond37 [142]
Poster because if you have that much space....well what I do is calculate it by the centimeters in square divide:)
6 0
3 years ago
Read 2 more answers
Compare computer virus and worm ​
Zina [86]

Answer:

You can say they're somewhat alike, since a worm wiggles into a tight spot, just like how a computer virus wiggles into your computer-

Hope this helps-

7 0
3 years ago
Read 2 more answers
A small company has a web server in the office that is accessible from the internet. the ip address 192.168.10.15 is assigned to
vaieri [72.5K]
the ip nat inside source command to link the inside local and inside global addresses

I hope this helps! :)
5 0
3 years ago
Why do you think the 5 paragraph format is so useful when it comes to writing essay answers?
mart [117]
I think it help writing more understandable!
8 0
3 years ago
Read 2 more answers
Need help ASAP??? Pick the best answers
zloy xaker [14]

Answer:

A and C are correct pick both

7 0
3 years ago
Other questions:
  • If a full disk encryption (FDE) password is forgotten, what can be incorporated to securely store the encryption key to unlock t
    13·1 answer
  • List and describe four communication tools that are currently popular.
    9·1 answer
  • Based on your research and understanding, write a 3- to 4-page Microsoft Word document that:
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • If your vehicle leaves the pavement for any reason, remember to take your foot off the gas pedal, hold the wheel firmly, and____
    8·2 answers
  • A software package developed to handle information requirements for a specific type of business is called a(n) ____. A. outsourc
    10·1 answer
  • Beneficios del reciclaje electrónico
    6·1 answer
  • Do you think communities or countries can survive without the internet?why or why not?​
    11·1 answer
  • Function _one(array)
    6·1 answer
  • Generally speaking, what is a “best practice"?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!