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
Why did the boy run from the pillow...... wrong answers only
Savatey [412]

He thinks there is a demon hiding innit thus, he runs and calls his mom. His mom says "Jimmy there's nothing in that pilow young man!" Jimmy walks back to his room scared if its still there. He hops into bed hoping that he can get a good nights rest. The next day, Jimmy asks if he can go buy another pillow. His mom says "As long as it makes you feel safe then ok." Young Jimmy, jumping in excitement, goes to the checkout zone to buy his new pillow. When they get home, Jimmy and his mom eat dinner and then head for bed. Jimmy hops into bed and knows that everything will be ok. The end.

4 0
2 years ago
In Microsoft Word you can access the _______ command from the "Mini toolbar". A. insert citation B. save as C. underline D. word
tresset_1 [31]
Save as is the command that you would use to save anything when using microsoft
4 0
3 years ago
Read 2 more answers
Explain with examples what is software​
zvonat [6]

Answer:

Software is the data in your computer for example apps

Explanation:

Apps are a form of software

8 0
2 years ago
Apakah ada yang bisa menjelaskan potongan source code ini?
GarryVolchara [31]

This code attempts to fuse two strings together. So,

fuse("Apple", "Banana")

would return "ABpapnlaen a"

However, there are a couple of things wrong with this code:

- The for loop is incomplete (probably a copy paste error)

- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)

- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!

6 0
3 years ago
What is the main idea of this article? Please someone help me. I will give brainliest answer
mart [117]
The main idea of this article is that theme parks are conducting scientific research that is benefiting the community. Hope this helps!
8 0
3 years ago
Other questions:
  • The command for creating a PivotTable is found in the <br> tab.
    7·1 answer
  • What does the do not disturb button do on the iphone?
    12·1 answer
  • Which of the following activities poses the greatest personal cybersecurity risk? A. Making a purchase on an online store that u
    13·1 answer
  • After a chart has been inserted and formatted, is it possible to change the data range it refers to or to add new rows of data?
    14·1 answer
  • Join my discord server! CODE IS (CebjBXN)​
    12·2 answers
  • Examples of application software​
    7·2 answers
  • What does XD mean? I keep seeing people say it and I dont know what it means
    6·2 answers
  • Where can formatting features be found ?! Need help asp !‍♀️
    9·1 answer
  • Which external reference is formatted correctly?
    6·2 answers
  • Only cool people answer this question.<br><br><br><br><br> are you cool?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!