Multiple Choice
Example Code Ch 11-1
public static void main(String[] args)
{
try
{
ExceptionThrowerCode etc = new ExceptionThrowerCode() ;
etc.m1() ;
etc.m2() ;
}
catch (ArithmeticException ae) { ... }
}
public class ExceptionThrowerCode
{
...
public void m1()
{
...
}
public void m2()
{
try
{
m3() ;
}
catch(ArithmeticException ae) {...}
catch(NullPointerException npe) {...}
}
public void m3()
{
try
{
...
}
catch(ArithmeticException ae) {...}
}
}
-Refer to Example Code Ch 11-1: If a NullPointerException arises in the try statement in m1
A) it is caught in main
B) it is caught in m1
C) it is caught in m2
D) it is caught in m3
E) it is not caught and the program terminates
Correct Answer:

Verified
Correct Answer:
Verified
Q20: The term "exception propagation" means<br>A) an exception
Q21: A finally clause will execute<br>A) only if
Q22: Which of the following messages passed to
Q23: Explain or provide an example showing how
Q24: An exception can produce a "call stack
Q26: System.err is a(n)<br>A) input stream<br>B) GUI dialog
Q27: Why might you want to create your
Q28: A Java program can handle an exception
Q29: What are the three standard I/O streams
Q30: Assume Exceptionname is a checked exception. If