java.lang
Class NullPointerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.NullPointerException

public class NullPointerException
extends RuntimeException

Thrown when attempting to use null where an object is required. The Virtual Machine automatically throws this exception for the following:

Applications should also throw NullPointerExceptions whenever null is an inappropriate parameter to a method.


Constructor Summary
NullPointerException()
          Create an exception without a message.
NullPointerException(String s)
          Create an exception with a message.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullPointerException

public NullPointerException()
Create an exception without a message.


NullPointerException

public NullPointerException(String s)
Create an exception with a message.

Parameters:
s - the message