OCA Java SE 8 Mock Exam - OCA Mock Question 3








Question

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

  1. Checked exceptions are intended to be thrown by the JVM and not the programmer.
  2. Checked exceptions are required to be caught or declared.
  3. Errors are intended to be thrown by the JVM and not the programmer.
  4. Runtime exceptions are required to be caught or declared.
  5. Runtime exceptions are intended to be thrown by the JVM and not the programmer.
  6. Errors are required to be caught or declared.




Answer



B, C.

Note

Only checked exceptions are required to be handled or declared.

Runtime exceptions are commonly thrown by both the JVM and programmer code.

Checked exceptions are usually thrown by programmer code.

Errors are intended to be thrown by the JVM.