OCA Java SE 8 Exception - OCA Mock Question Exception 3








Question

Which of the following statements are true? (Choose all that apply)

  1. Runtime exceptions are checked exceptions.
  2. Runtime exceptions are unchecked exceptions.
  3. You can declare only checked exceptions.
  4. You can declare only unchecked exceptions.
  5. You can handle only Exception subclasses.




Answer



B.

Note

Runtime exceptions are also called unchecked exceptions.

We can declare them but we are not required to check them.

Checked exceptions must be handled or declared.

Legally, you can handle java.lang.Error subclasses.