Home » JAVA Programming » Exceptions » Question
  1. What is the output of this program?
    public  class Result 
    {
    public static void main(String args[])
    {
    try
    {
    int p = 2;
    int q = 9;
    int s = p / q;
    System.out.print("First");
    }
    catch(Exception e)
    {
    System.out.print("Second");
    }
    }
    }
    1. First
    2. Second
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: A

First



Your comments will be displayed only after manual approval.