162k views
4 votes
Which class can be used to read data into a text file?

BufferedReader
System
ReadFile
FileRead

User Oniondomes
by
7.3k points

1 Answer

1 vote

Answer:

BufferedReader

Step-by-step explanation:

There are many ways for reading a file. Many classes independently or with combination can be used for this purpose.

Option (a) BufferedReader class can be used to read data of a file.

Option (b) The System class contains methods which are useful to conduct IO ( Input Output ) operations like Standard Input and Standard Output.This class cannot be used to read a file. So, option (b) is not correct answer.

Option (c) and (d) Even though the names ReadFile and FileRead seems to be classes related to reading a file but there are no classes with the names ReadFile and FileRead. Infact there is a class named "FileReader" which can be used to read a file along with "BufferedReader" class. So, options (c) and (d) are not correct answers.

User Jpduro
by
9.1k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.