When I execute the code below, I see the output as:
Finally
Exception in thread "main" java.lang.NullPointerException on ClientTestConcepts.main (ClientTestConcepts.java:9)
Who prints bold statements.
public class ClientTestConcepts {
public static void main(String []args){
try{
throw new NullPointerException();
}
finally{
System.out.println("Finally");
}
}
}
source
share