What will be the result of the following statements?
FileInputStream fstream =
New FileInputStream("DataIn.dat") ;
DataInputStream inFile =
New DataInputStream(fstream) ;
A) The inFile variable will reference an object that is able to read only text data from the Input.dat file.
B) The inFile variable will reference an object that is able to read binary data from the Input.dat file.
C) The inFile variable will reference an object that is able to write binary data to the Input.dat file.
D) The inFile variable will reference an object that is able to read random access data from the Input.dat file.
Correct Answer:
Verified
Q25: The try statement may have an optional
Q30: Look at the following code: FileInputStream fstream
Q31: When writing a string to a binary
Q32: If the program does not handle an
Q33: In a multi-catch, (introduced in Java 7)
Q36: When an exception is thrown by code
Q37: Classes that inherit from the Error class
Q38: In a catch statement, what does the
Q39: The catch clause:
A) follows the try clause
B)
Q40: If the IOData.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