Question: Consider the following code snippet: File inputFile = new File(filename); try (Scanner in = new Scanner(inputFile)) { . . . } catch (Exception e) {
Consider the following code snippet:
File inputFile = new File(filename); try (Scanner in = new Scanner(inputFile)) { . . . } catch (Exception e) { } Which of the following statements about this code is correct?
Question 12 options:
|
|
This code will catch exceptions that occur in the try block but will do nothing about the exceptions
|
|
|
This code will pass any exceptions back to its caller.
|
|
|
This code will not catch any exceptions that occur in the try block.
|
|
|
This code will not catch a FileNotFoundException that occurs in the try block.
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
