null
in a
case where an object is required. These include:
null
object.
null
object.
null
as if it were an array.
null
as if it
were an array.
null
as if it were a Throwable
value.
Applications should throw instances of this class to indicate
other illegal uses of the null
object.
NullPointerException
objects may be constructed by the
virtual machine as if suppression were disabled and/or the
stack trace was not writable.
Modifier and Type | Field and Description |
---|---|
private transient String | |
private transient int | |
private static final long |
Access | Constructor and Description |
---|---|
public | |
public | NullPointerException(String
the detail message. s)Constructs a |
Modifier and Type | Method and Description |
---|---|
public synchronized Throwable | fillInStackTrace()
Overrides java. Fills in the execution stack trace. |
private native String | |
public String | Returns: the detail message string, which may benull .Overrides java. Returns the detail message string of this throwable. |
extendedMessage | back to summary |
---|---|
private transient String extendedMessage |
extendedMessageState | back to summary |
---|---|
private transient int extendedMessageState |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides java. |
NullPointerException | back to summary |
---|---|
public NullPointerException() Constructs a |
NullPointerException | back to summary |
---|---|
public NullPointerException(String s) Constructs a
|
fillInStackTrace | back to summary |
---|---|
public synchronized Throwable fillInStackTrace() Overrides java. Doc from java. Fills in the execution stack trace. This method records within this
If the stack trace of this
|
getExtendedNPEMessage | back to summary |
---|---|
private native String getExtendedNPEMessage() Get an extended exception message. This returns a string describing the location and cause of the exception. It returns null for exceptions where this is not applicable. |
getMessage | back to summary |
---|---|
public String getMessage() Overrides java. Returns the detail message string of this throwable. If a non-null message was supplied in a constructor it is
returned. Otherwise, an implementation specific message or
Implementation Note If no explicit message was passed to the constructor, and as long as certain internal information is available, a verbose description of the null reference is returned. The internal information is not available in deserialized NullPointerExceptions.
|