Home » Tag Archives: Null Object Pattern

Tag Archives: Null Object Pattern

java.lang.NullPointerException Example – How to handle Java Null Pointer Exception

In this post, we feature a comprehensive example of java.lang.NullPointerException. In Java, a special null value can be assigned to an object’s reference and denotes that the object is currently pointing to an unknown piece of data. A NullPointerExceptionis thrown when an application is trying to use or access an object whose reference equals to null. The following cases throw that exception: Invoking a method from ...

Read More »