36.2k views
4 votes
What will be the result of the following statements? FileInputStream fstream = new FileInputStream("Input.dat"); DataInputStream inFile = new DataInputStream(fstream); The inFile variable will reference an object that is able to read text data from the Input.dat file. The inFile variable will reference an object that is able to read random access data from the Input.dat file. The inFile variable will reference an object that is able to write binary data to the Input.dat file. The inFile variable will reference an object that is able to read binary data from the Input.dat file.

1 Answer

6 votes

Answer:

The answer is the last choice that is "Choice D".

Step-by-step explanation:

In the given question the numbering of the choices is missing which can be defined in the attached file please find it.

In the above-given java program code, a "FileInputStream" class is used that creates an object that is "fstream", for input the file that is "Input.dat". In the next line, the "DataInputStream" class is used that creates an object that is "inFile", which is used as a reference an object and allow the user to read the binary data from the file.

What will be the result of the following statements? FileInputStream fstream = new-example-1
User Morgs
by
5.3k points