Home » JAVA Programming » Exceptions » Question
  1. What is the output of this program?
     public class I_LOVE_YOU
    {
    public static void main(String args[])
    {
    try
    {
    int You, Me, You_Me;
    You = 0;
    Me = 5;
    You_Me = Me/You;
    System.out.print("I MISS U ALWAYS...");
    }
    catch(ArithmeticException e)
    {
    System.out.print("I LOVE YOU");
    }
    finally
    {
    System.out.print(" FOREVER...");
    }
    }
    }
    1. I MISS U ALWAYS...
    2. I LOVE YOU
    3. FOREVER...
    4. I LOVE YOU FOREVER...
    5. None of these
Correct Option: D

I LOVE YOU FOREVER...



Your comments will be displayed only after manual approval.