|
|
От: | Аноним | |
| Дата: | 16.11.10 09:56 | ||
| Оценка: | |||
A compile-time error occurs if any ExceptionType mentioned in a throws clause is not a subtype (§4.10) of Throwable. It is permitted but not required to mention other (unchecked) exceptions in a throws clause.
A compiler for the Java programming language checks, at compile time, that a program contains handlers for checked exceptions, by analyzing which checked exceptions can result from execution of a method or constructor.
The unchecked exceptions classes are the class RuntimeException and its subclasses, and the class Error and its subclasses. All other exception classes are checked exception classes.