Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 256
نمايش فراداده

RuntimeExceptionjava.lang

Java 1.0serializable unchecked

This exception type is not used directly, but serves as a superclass of a group of run-time exceptions that need not be declared in the throws clause of a method definition. These exceptions need not be declared because they are runtime conditions that can generally occur in any Java method. Thus, declaring them would be unduly burdensome, and Java does not require it.

This class inherits methods from Throwable but declares none of its own. Each of the RuntimeException constructors simply invokes the corresponding Exception( ) and Throwable( ) constructor. See THRowable for details.

Figure 10-52. java.lang.RuntimeException

public class

RuntimeException extends Exception { // Public Constructors public

RuntimeException ( );

1.4 public

RuntimeException (Throwable

cause ); public

RuntimeException (String

message );

1.4 public

RuntimeException (String

message , Throwable

cause ); }

Subclasses

Too many classes to list.