Question
Which of the following statements are true?
Choose all that apply
- A. Runtime exceptions are the same thing as checked exceptions.
- B. Runtime exceptions are the same thing as unchecked exceptions.
- C. You can declare only checked exceptions.
- D. You can declare only unchecked exceptions.
- E. You can handle only Exception subclasses.
B.
Note
Runtime exceptions are also known as unchecked exceptions.
They are allowed to be declared, but they don't have to be.
Checked exceptions must be handled or declared.
Legally, you can handle java.lang.Error subclasses, but it's not a good idea.
PreviousNextRelated