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 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 leading to the program terminating
Correct Answer:

Verified
Correct Answer:
Verified
Q14: Assume Exceptionname is a checked exception. If
Q14: Write a set of code that will
Q15: What is a mnemonic?<br> What are they
Q17: Use the code below to answer the
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
Q22: For the questions below, use the following
Q23: Test scores should fall between 0 and
Q33: A processing stream is a data stream