Packages  This Package  Prev  Next  Index  

§1.40 Class NullPointerException

public  class  java.lang.NullPointerException
    extends  java.lang.RuntimeException  (I-§1.42)
{
        // Constructors
    public NullPointerException();	§1.40.1
    public NullPointerException(String  s);	§1.40.2
}
Thrown when an application attempts to use null in a case where an object is required. These include:

Applications should throw instances of this class to indicate other illegal uses of the null object.


Constructors

NullPointerException

public NullPointerException()
Constructs a NullPointerException with no detail message.

NullPointerException

public NullPointerException(String s)
Constructs a NullPointerException with the specified detail message.
Parameters:
s - the detail message

Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com