- All Implemented Interfaces:
public class NullPointerException
Thrown when an application attempts to use
case where an object is required. These include:
- Calling the instance method of a
- Accessing or modifying the field of a
- Taking the length of
null as if it were an array.
- Accessing or modifying the slots of
null as if it
were an array.
null as if it were a
Applications should throw instances of this class to indicate
other illegal uses of the
NullPointerException objects may be constructed by the
virtual machine as if suppression were disabled and/or the
stack trace was not writable.
- See Also:
- Serialized Form
Methods declared in class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
NullPointerException with no detail message.
NullPointerException with the specified
s - the detail message.