java.lang.NullPointerException in Java
java.lang.NullPointerException in Java In Java “java.lang.NullPointerException” exception is the one that every beginner face once a while. The reason is variable at which the error occurred, does not contain any value or object reference. 1. If u define any reference variable and don’t create any object for that variable 2. If u define any reference variable globally but when u create the object then again define it Example:- Object a; // declare an object a.hashcode(); // trying to call a method on the…