Java Demo
Java Code Output
java.lang.NullPointerException