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
Q65: What is the purpose of the throw
Q75: You wish to use the Scanner class's
Q81: Consider the following code snippet:
Try
{
PrintWriter outputFile =
Q84: Consider the following code snippet:
Try
{
PrintWriter outFile =
Q85: Insert the missing code in the following
Q93: Which of the following statements about exception
Q95: An example of a fatal error that
Q96: Which of the following statements about checked
Q96: If the current method in a program
Q100: Which of the following statements about exception
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