public class NullPointerException extends RuntimeException
null. It also occurs in some other, less
obvious circumstances, like a throw e statement where the Throwable reference is null.| Constructor and Description |
|---|
NullPointerException()
Constructs a new
NullPointerException that includes the current
stack trace. |
NullPointerException(String detailMessage)
Constructs a new
NullPointerException with the current stack
trace and the specified detail message. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic NullPointerException()
NullPointerException that includes the current
stack trace.public NullPointerException(String detailMessage)
NullPointerException with the current stack
trace and the specified detail message.detailMessage - the detail message for this exception.