Home » JAVA Programming » Exceptions » Question
  1. What is the output of this program?
    public class exception_Example
    {
    static void throwexception() throws ArithmeticException
    {
    System.out.print("50");
    throw new ArithmeticException ("Exception");
    }
    public static void main(String args[])
    {
    try
    {
    throwexception();
    }
    catch (ArithmeticException e)
    {
    System.out.println("M");
    }
    }
    }
    1. 50
    2. M
    3. 50M
    4. M50
    5. None of these
Correct Option: C

50M



Your comments will be displayed only after manual approval.