Multiple Choice
For the questions below, use the following skeletal code.
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) {...}
}
}
-If an ArithmeticException arises in the try statement in m3
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 leading to the program terminating
Correct Answer:

Verified
Correct Answer:
Verified
Q17: Use the code below to answer the
Q18: For the questions below, use the following
Q19: System.err is a(n)<br>A) input stream<br>B) GUI dialog
Q20: All run-time Errors throw Exceptions.
Q21: A Swing tool tip is<br>A) a mechanism
Q23: Test scores should fall between 0 and
Q24: Rewrite the following method using try and
Q25: Explain or provide an example showing how
Q26: If an exception is thrown and is
Q27: For the questions below, use the following