OCA Java SE 8 Exception - OCA Mock Question Exception 15
Question
Which of the following are true? (Choose all that apply)
- Checked exceptions are allowed to be handled or declared.
- Checked exceptions are required to be handled or declared.
- Errors are allowed to be handled or declared.
- Errors are required to be handled or declared.
- Runtime exceptions are allowed to be handled or declared.
- Runtime exceptions are required to be handled or declared.
Answer
Note
Checked exceptions are required to be handled or declared.
Runtime exceptions are allowed to be handled or declared but not required.
Errors are allowed to be handled or declared, but it is not a good practice to handle Error.