What will be the result of the following code?
FileOutputStream fstream new FileOutputStream("Output.dat") ;
DataOutputStream outputFile = new DataOutputStream(fstream) ;
A) The outputFile variable will reference an object that is able to write text data only to the Output.dat file.
B) The outputFile variable will reference an object that is able to write binary data to the Output.dat file.
C) The outputFile variable will reference an object that is able to read binary data from the Output.dat file.
D) The outputFile variable will reference an object that is able to write to Output.dat as a random access file.
Correct Answer:
Verified
Q10: The throws clause causes an exception to
Q15: When the code in a try block
Q20: A catch clause that uses a parameter
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,
Q44: If you want to append data to
Q45: In versions of Java prior to Java
Q46: Beginning in Java 7, multi-catch can reduce
Q47: When deserializing an object using the readObject
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