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
How is marketing related to the other functions of a business
lorasvet [3.4K]
Marketing<span> is an essential process to the success of your small </span>business<span>. </span>Marketing <span>involves researching, packaging and presenting products and services to consumers.</span>
5 0
3 years ago
Describe the functions of ALU, resisters, CU, BIU, Cache and FPU.
stich3 [128]

Answer:

ALU :An arithmetic logic unit (ALU) is a digital circuit used to perform calculations and logic operations

Registers:register holds the address of memory where CPU wants to read or write data.

CU:The control unit (CU) is a component of a computer's central processing unit (CPU) that directs the operation of the processor.

BIU:BIU takes care of all data and addresses transfers on the buses for the EU like sending addresses, fetching instructions from the memory, reading data from the ports and the memory as well as writing data to the ports and the memory.

Cache:Cache is used to temporarily hold instructions and data that the CPU is likely to reuse.

FPU:A floating-point unit (FPU, colloquially a math coprocessor) is a part of a computer system specially designed to carry out operations on floating-point numbers.

Explanation:

This is all I can say

5 0
3 years ago
Which practice is the safest way to sit at a desk while typing on the computer?
qwelly [4]
Lol just lay back and unleash your gamer side
8 0
4 years ago
A laptop has an Nvme drive (C:) and a mechanical hard drive (D:), when the user notice that the D: drive is not there.
Ghella [55]

Answer:

Explanation:

The user should type in the search bar at the bottom right of the taskbar the following keywords, Create and format hard disk partitions and click on the option that appears with the same name. This will open Disk Management which will give information on all of the different storage options that the computer has installed. If the OS is detecting and recognizing the drive it will appear here. Many times the drive does not appear because it does not have a drive letter assigned to it. This can be assigned to the drive from the Disk Management.

6 0
3 years ago
What are the preset formulas in a spreadsheet called?
Oksanka [162]
They are called functions on a spreadsheet.
5 0
4 years ago
Read 2 more answers
Other questions:
  • Which cloud computing service model gives software developers access to multiple operating systems for testing?
    5·1 answer
  • Paragraph: Read the following two e-mail messages. In a paragraph of no less than 125 words, explain why e-mail B is the more ap
    11·1 answer
  • Application partitioning gives developers the opportunity to write application code that can later be placed on either a client
    7·1 answer
  • The three activities in an information system that produce the information organizations use to control operations are:a.informa
    9·2 answers
  • The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify phys
    15·1 answer
  • The cost of an items is Rs 200. what will be the cost of 50 such items. write a simple program​
    10·1 answer
  • If a person's mobile phone was designed to work with 4G technology, what will happen when a 5G network is rolled out in their ar
    14·1 answer
  • Which type of wireless attack is designed to capture wireless transmissions coming from legitimate users
    6·1 answer
  • WRITE A PROGRAM TO CALCULATE SIMPLE INTEREST
    12·1 answer
  • A service _ consists of overhead wires and devices that connect the power company power lines to a residence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!