What is NPE Java provides a special type of value called null to indicate that no actual value is assigned to a reference variable. This value may cause one of the most frequent exceptions called NullPointerException (often referred to as NPE for short). It occurs when a program attempts to use a variable with the null value. To avoid an NPE, the programmer must ensure that the objects are initialized before their use.