java.lang
Class RuntimeException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by java.lang.RuntimeException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AnnotationTypeMismatchException sample code for java.lang.annotation.AnnotationTypeMismatchException definition code for java.lang.annotation.AnnotationTypeMismatchException , ArithmeticException sample code for java.lang.ArithmeticException definition code for java.lang.ArithmeticException , ArrayStoreException sample code for java.lang.ArrayStoreException definition code for java.lang.ArrayStoreException , BufferOverflowException sample code for java.nio.BufferOverflowException definition code for java.nio.BufferOverflowException , BufferUnderflowException sample code for java.nio.BufferUnderflowException definition code for java.nio.BufferUnderflowException , CannotRedoException sample code for javax.swing.undo.CannotRedoException definition code for javax.swing.undo.CannotRedoException , CannotUndoException sample code for javax.swing.undo.CannotUndoException definition code for javax.swing.undo.CannotUndoException , ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException , CMMException sample code for java.awt.color.CMMException definition code for java.awt.color.CMMException , ConcurrentModificationException sample code for java.util.ConcurrentModificationException definition code for java.util.ConcurrentModificationException , DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException , EmptyStackException sample code for java.util.EmptyStackException definition code for java.util.EmptyStackException , EnumConstantNotPresentException sample code for java.lang.EnumConstantNotPresentException definition code for java.lang.EnumConstantNotPresentException , EventException sample code for org.w3c.dom.events.EventException definition code for org.w3c.dom.events.EventException , IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException , IllegalMonitorStateException sample code for java.lang.IllegalMonitorStateException definition code for java.lang.IllegalMonitorStateException , IllegalPathStateException sample code for java.awt.geom.IllegalPathStateException definition code for java.awt.geom.IllegalPathStateException , IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException , ImagingOpException sample code for java.awt.image.ImagingOpException definition code for java.awt.image.ImagingOpException , IncompleteAnnotationException sample code for java.lang.annotation.IncompleteAnnotationException definition code for java.lang.annotation.IncompleteAnnotationException , IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException , JMRuntimeException sample code for javax.management.JMRuntimeException definition code for javax.management.JMRuntimeException , LSException sample code for org.w3c.dom.ls.LSException definition code for org.w3c.dom.ls.LSException , MalformedParameterizedTypeException sample code for java.lang.reflect.MalformedParameterizedTypeException definition code for java.lang.reflect.MalformedParameterizedTypeException , MissingResourceException sample code for java.util.MissingResourceException definition code for java.util.MissingResourceException , NegativeArraySizeException sample code for java.lang.NegativeArraySizeException definition code for java.lang.NegativeArraySizeException , NoSuchElementException sample code for java.util.NoSuchElementException definition code for java.util.NoSuchElementException , NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException , ProfileDataException sample code for java.awt.color.ProfileDataException definition code for java.awt.color.ProfileDataException , ProviderException sample code for java.security.ProviderException definition code for java.security.ProviderException , RangeException sample code for org.w3c.dom.ranges.RangeException definition code for org.w3c.dom.ranges.RangeException , RasterFormatException sample code for java.awt.image.RasterFormatException definition code for java.awt.image.RasterFormatException , RejectedExecutionException sample code for java.util.concurrent.RejectedExecutionException definition code for java.util.concurrent.RejectedExecutionException , SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException , SystemException sample code for org.omg.CORBA.SystemException definition code for org.omg.CORBA.SystemException , TypeNotPresentException sample code for java.lang.TypeNotPresentException definition code for java.lang.TypeNotPresentException , UndeclaredThrowableException sample code for java.lang.reflect.UndeclaredThrowableException definition code for java.lang.reflect.UndeclaredThrowableException , UnmodifiableSetException sample code for javax.print.attribute.UnmodifiableSetException definition code for javax.print.attribute.UnmodifiableSetException , UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException

public class RuntimeException
extends Exception sample code for java.lang.Exception definition code for java.lang.Exception

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.

A method is not required to declare in its throws clause any subclasses of RuntimeException that might be thrown during the execution of the method but not caught.

Since:
JDK1.0
See Also:
Serialized Form

Constructor Summary
RuntimeException sample code for java.lang.RuntimeException.RuntimeException() definition code for java.lang.RuntimeException.RuntimeException() ()
          Constructs a new runtime exception with null as its detail message.
RuntimeException sample code for java.lang.RuntimeException.RuntimeException(java.lang.String) definition code for java.lang.RuntimeException.RuntimeException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  message)
          Constructs a new runtime exception with the specified detail message.
RuntimeException sample code for java.lang.RuntimeException.RuntimeException(java.lang.String, java.lang.Throwable) definition code for java.lang.RuntimeException.RuntimeException(java.lang.String, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  message, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Constructs a new runtime exception with the specified detail message and cause.
RuntimeException sample code for java.lang.RuntimeException.RuntimeException(java.lang.Throwable) definition code for java.lang.RuntimeException.RuntimeException(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
 
Method Summary
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) , toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

RuntimeException sample code for java.lang.RuntimeException() definition code for java.lang.RuntimeException()

public RuntimeException()
Constructs a new runtime exception with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable) sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) .


RuntimeException sample code for java.lang.RuntimeException(java.lang.String) definition code for java.lang.RuntimeException(java.lang.String)

public RuntimeException(String sample code for java.lang.String definition code for java.lang.String  message)
Constructs a new runtime exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable) sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) .

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() method.

RuntimeException sample code for java.lang.RuntimeException(java.lang.String, java.lang.Throwable) definition code for java.lang.RuntimeException(java.lang.String, java.lang.Throwable)

public RuntimeException(String sample code for java.lang.String definition code for java.lang.String  message,
                        Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Constructs a new runtime exception with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this runtime exception's detail message.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4

RuntimeException sample code for java.lang.RuntimeException(java.lang.Throwable) definition code for java.lang.RuntimeException(java.lang.Throwable)

public RuntimeException(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for runtime exceptions that are little more than wrappers for other throwables.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4