Multiple Choice
Look at the following code: FileInputStream fstream =
New FileInputStream("MyInfo.dat") ;
DataInputStream inputFile =
New DataInputStream(fstream) ;
This code can also be written as:
A) FileInputStream inputFile = new FileInputStream(new DataInputStream("MyInfo.dat") ) ;
B) DataInputStream inputFile = new DataInputStream(new FileInputStream("MyInfo.dat") ) ;
C) FileInputStream fstream = new DataInputStream("InputFile.txt") ;
D) DataInputStream inputFile = new DataInputStream("InputFile.txt") ;
Correct Answer:

Verified
Correct Answer:
Verified
Q24: When an exception is thrown by a
Q32: If a method does not handle a
Q33: To write data to a binary file
Q34: The IllegalArgumentException class extends the RuntimeException class,
Q36: If the program does not handle an
Q38: Assume that the classes BlankISBN, NegativePrice, and
Q39: If the code in a method can
Q40: When you write a method that throws
Q41: The ability to catch multiple types of
Q42: Beginning in Java 7, multi-catch can reduce