11.
What will be the output of the following Java program?
class exception_handling 
{
    public static void main(String args[]) 
    {
        try 
        {
            int a, b;
            b = 0;
            a = 5 / b;
            System.out.print("A");
        }
        catch(ArithmeticException e) 
        {
      System.out.print("B");        	
        }
        finally 
        {
          System.out.print("C");
        }
    }
}

12.
What will be the output of the following Java code?
public class A
{
    public static void main(String args[])
    {
        try 
        {
            System.out.print("Hello world ");
        }
        finally 
        {
            System.out.println("Finally executing ");
        }
    }
}

13.
What will be the output of the following Java program?
class exception_handling 
{
    public static void main(String args[]) 
    {
        try 
        {
            System.out.print("Hello" + " " + 1 / 0);
        }
        catch(ArithmeticException e) 
        {
      System.out.print("World");        	
        }
    }
}

Read More Section(Exceptions)

Each Section contains maximum 100 MCQs question on Exceptions. To get more questions visit other sections.