Multiple Choice
Consider the following code snippet:
Try
{
File inputFile = new File(filename) ;
Scanner in = new Scanner(inputFile) ;
) . .
}
Catch (Exception e) {
}
Which of the following statements about this code is correct?
A) This code will not catch a FileNotFoundException that occurs in the try block.
B) This code will pass any exceptions back to its caller.
C) This code will catch exceptions that occur in the try block but will do nothing about the exceptions.
D) This code will not catch any exceptions that occur in the try block.
Correct Answer:

Verified
Correct Answer:
Verified
Q7: Insert the missing code in the following
Q27: Consider the following code snippet: System.out.printf("%-12s%8.2f",description,totalPrice);<br>Which of
Q28: Consider the following code snippet:<br>Throw IllegalStateException("This operation
Q29: Insert the missing code in the following
Q30: Consider the following code snippet:<br>Try<br>{<br>PrintWriter outFile =
Q36: You have opened a command prompt window
Q37: Which of the following code snippets about
Q40: Which method of an exception object will
Q54: Consider the following code snippet: Scanner in
Q108: Consider the following code snippet: PrintWriter out