java.lang
public class: NullPointerException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.NullPointerException
All Implemented Interfaces:
Serializable
Thrown when a program tries to access a field or method of an object or an
element of an array when there is no instance or array to use, that is if the
object or array points to {@code null}. It also occurs in some other, less
obvious circumstances, like a {@code throw e} statement where the
Throwable reference is {@code null}.
| Constructor: |
public NullPointerException() {
super();
}
Constructs a new {@code NullPointerException} that includes the current
stack trace. |
public NullPointerException(String detailMessage) {
super(detailMessage);
}
Constructs a new {@code NullPointerException} with the current stack
trace and the specified detail message. Parameters:
detailMessage -
the detail message for this exception.
|
| Methods from java.lang.Throwable: |
|---|
|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |