Which two statements correctly describe checked exception?

A. These are exceptional conditions that a well-written application should anticipate and recover from.
B. These are exceptional conditions that are external to the application, and that the application usually cannot anticipate or recover from.
C. These are exceptional conditions that are internal to the application, and that the application usually cannot anticipate or recover from.
D. Every class that is a subclass of RuntimeException and Error is categorized as checked exception.
E. Every class that is a subclass of Exception, excluding RuntimeException and its subclasses, is categorized as checked exception.

题解

选项 A,checked exception 在撰写程序的时候一定要被处理,所以这个叙述是正确的。

选项 B,这是 Error 的叙述。

选项 C,这是 RuntimeException 的叙述。RuntimeException 为 unchecked exception。

选项 D,RuntimeException 和 Error 以及继承它们的例外和错误都是 unchecked exception 才对。

选项 E,除了 RuntimeException 和继承 RuntimeException 的例外之外,Exception 和其它继承 Exception 的例外都是 checked exception。