Professional Documents
Culture Documents
Java Assgn
Java Assgn
Ans: - If the exception is not handled by any provided catch block, the JVM
default exception handler handle it. In this case, finally block will be
executed followed by default exception handling mechanism.
Input (ECE/17/
try
{
System.out.println ("try block");
throw new NullPointerException ("Null occurred");
}
finally
{
System.out.println ("finally block");
}
Output
try block
finally block