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
Q7: Which of the following is not True
Q8: For the questions below, use the following
Q9: Use the code below to answer the
Q10: The Scanner class provides an abstraction for
Q13: Use the code below to answer the
Q13: The idea that an object can exist
Q14: Use the code below to answer the
Q16: For the questions below, use the following
Q17: A finally clause will execute
A) only if
Q22: Character streams manage
A) byte-sized data
B) binary data
C)
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