Home » JAVA Programming » Exceptions » Question
  1. What is the output of this program?
    public class exception_handling 
    {
    public static void main(String args[])
    {
    try
    {
    int p, q;
    q = 0;
    p = 5 / q;
    System.out.print("Love");
    }
    catch(ArithmeticException e)
    {
    System.out.print("You");
    }
    }
    }
    1. Love You
    2. You Love
    3. Love
    4. You
    5. None of these
Correct Option: D

You



Your comments will be displayed only after manual approval.