java.lang
Class RuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
Direct Known Subclasses:
ArithmeticException, ArrayStoreException, ClassCastException, ConcurrentModificationException, IllegalArgumentException, IllegalMonitorStateException, IllegalStateException, IndexOutOfBoundsException, MissingResourceException, NegativeArraySizeException, NoSuchElementException, NullPointerException, UnsupportedOperationException

public class RuntimeException
extends Exception

All exceptions which are subclasses of RuntimeException can be thrown at any time during the execution of a Java virtual machine. Methods which throw these exceptions are not required to declare them in their throws clause.


Constructor Summary
RuntimeException()
          Create an exception without a message.
RuntimeException(String s)
          Create an exception with a message.
RuntimeException(String s, Throwable cause)
          Create an exception with a message and a cause.
RuntimeException(Throwable cause)
          Create an exception with the given cause, and a message of cause == null ? null : cause.toString().
 
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

RuntimeException

public RuntimeException()
Create an exception without a message. The cause remains uninitialized.

See Also:
Throwable.initCause(Throwable)

RuntimeException

public RuntimeException(String s)
Create an exception with a message. The cause remains uninitialized.

Parameters:
s - the message string
See Also:
Throwable.initCause(Throwable)

RuntimeException

public RuntimeException(String s,
                        Throwable cause)
Create an exception with a message and a cause.

Parameters:
s - the message string
cause - the cause of this exception
Since:
1.4

RuntimeException

public RuntimeException(Throwable cause)
Create an exception with the given cause, and a message of cause == null ? null : cause.toString().

Parameters:
cause - the cause of this exception
Since:
1.4