Which of the statements below give an alternative way to write the following: FileInputStream fstream = new FileInputStream("info.dat") ;
DataInputStream inputFile = new DataInputStream(fstream) ;
A) DataInputStream inputFile = new DataInputStream(new FileInputStream("info.dat") ) ;
B) DataInputStream inputFile = new DataInputStream("info.txt") ;
C) FileInputStream inputFile = new FileInputStream(new DataInputStream("info.dat") ) ;
D) FileInputStream fstream = new DataInputStream("info.txt") ;
Correct Answer:
Verified
Q22: To read data from a binary file,
Q26: All of the exceptions that you will
Q27: If a random access file contains a
Q34: A file that contains raw binary data
Q35: When using the throw statement, if you
Q38: To serialize an object and write it
Q41: Unchecked exceptions are those that inherit from
Q46: If a method does not handle a
Q51: What will be the result of the
Q54: If the data.dat file does not exist,
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents