Java - Exception Handling
What will be printed when the following Java code is executed?
public class Demo {
public static void main(String[] args) {
try {
String s = null;
System.out.println(s.length());
} catch (NullPointerException e) {
System.out.println("Null pointer caught");
}
}
}