java.lang
Class RuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- Direct Known Subclasses:
- ArithmeticException, ArrayStoreException, ClassCastException, EmptyStackException, IllegalArgumentException, IndexOutOfBoundsException, NegativeArraySizeException, NoSuchElementException, NullPointerException, OutOfResourcesException, SecurityException
public class RuntimeException extends Exception
RuntimeException
is the superclass of all classes that represent exceptional conditions which occur as a result of executing an application in the virtual machine. Unlike checked exceptions (exceptions where the type doesn't extendRuntimeException
orError
), the compiler does not require code to handle runtime exceptions.
-
-
Constructor Summary
Constructors Constructor and Description RuntimeException()
Constructs a newRuntimeException
that includes the current stack trace.RuntimeException(String detailMessage)
Constructs a newRuntimeException
with the current stack trace and the specified detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
fillInStackTrace, getMessage, getStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
RuntimeException
public RuntimeException()
Constructs a newRuntimeException
that includes the current stack trace.
-
RuntimeException
public RuntimeException(String detailMessage)
Constructs a newRuntimeException
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this exception.
-
-