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 one of the benefits of using a library in a program?
Phoenix [80]

Answer:

Simplifies creating a complex program

Explanation:

7 0
3 years ago
What is a symbol such as a heavy dot or another character that precedes a text in a power point
Fantom [35]

Answer:

<em>I </em><em>think </em><em>the </em><em>answer </em><em>is </em><em>a </em><em>bullet.</em>

<em>Hope </em><em>this </em><em>helps</em>

4 0
2 years ago
When performing actions between your computer and one that is infected with a virus which of the following offers no risk becomi
Mama L [17]

Going to need your answer choices

thanks :)

6 0
3 years ago
I got a kahoot! Totally random pls join!<br><br> Code 08408519!
OlgaM077 [116]

Answer:

say less

Explanation:

5 0
3 years ago
Read 2 more answers
Read the following scenario, and then answer the question.
maxonik [38]

Answer:

Monitor size

Explanation:

Hope this helps

4 0
3 years ago
Read 2 more answers
Other questions:
  • When naming a file to upload into an assignment in blackboard, it is okay to use special characters?
    13·1 answer
  • What is responsible for coordinating a computer's hardware and software components?
    13·1 answer
  • (((PLEASE HELP QUICK))) When writing research questions you should begin with ____.
    13·2 answers
  • /*
    8·1 answer
  • A _______ is a website specially designed to allow visitors to use their browser to add, edit, or delete the site's content.
    9·2 answers
  • Given the following class: Create a class MyGenerator that can be used in the below main method.
    8·1 answer
  • Identifying the Property for Setting Page Breaks
    8·1 answer
  • Why do you think it is important to know typography and color when designing web sites?
    15·2 answers
  • It is recommended that systems administrators analyze logs in order to determine if they have been altered because monitoring ca
    14·1 answer
  • In cell K10, create a formula using the SUM function that calculated the total of the range F17:F20 subtracts it from the value
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!