ExamVeda
Login
Home
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");
        }
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
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 ");
        }
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
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");        	
        }
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
14
Which of these class is related to all the exceptions that are explicitly thrown?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
15
Which of these keywords is not a part of exception handling?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board