Exceptions - Study Mode
[#66] Which of these class is related to all the exceptions that are explicitly thrown?
Correct Answer
(C) Throwable
[#67] Which of these keywords is not a part of exception handling?
Correct Answer
(C) thrown
[#68] What is the result of the following code snippet? try { int[] arr = new int[5]
int value = arr[10]
} catch (ArrayIndexOutOfBoundsException e) { System.out.println("Exception Caught!")
}
Correct Answer
(B) Exception Caught!
[#69] 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")
}
}
}
Correct Answer
(D) BC
[#70] 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 ")
}
}
}
Correct Answer
(D) Hello world Finally executing