Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

What will occur if the catch block in program show below are reversed? class Quiz2H {    public static void main(String[] args)    {        try        {  

What will occur if the catch block in program show below are reversed?

class Quiz2H
{
public static void main(String[] args)
{
try
{
aMethod();
System.out.println(“After the call”);
}
catch (ArithmeticException exception)
{
System.out.println(“Arithmetic Exception”);
}
catch (RuntimeException exception)
{
System.out.println(“Runtime Exception”);
}
System.out.println(“After the try-catch statement”);
}
private static void aMethod() throws RuntimeException
{
int x = 1/0;
}
}

options:

Only the RuntimeException will be caught
The program will no longer compile
The change will have no effect, the program will work the same as before
Both exceptions will be caught
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"