-
What is the output of this program?
public class Null_Pointer_Exception
{
public static void main(String args[])
{
try
{
System.out.print("First");
throw new NullPointerException ("Interview Mania");
}
catch(ArithmeticException e)
{
System.out.print("Second");
}
}
}
-
- First
- Second
- Interview Mania
- Compilation Error
- Runtime Error
Correct Option: E
FirstException in thread "main" java.lang.NullPointerException: Interview Mania
at Null_Pointer_Exception.main(Null_Pointer_Exception.java:8)