Courseiva
Exception Handling and Development ToolshardMultiple ChoiceObjective-mapped

1Z0-811 Exception Handling and Development Tools Practice Question

A custom exception class must extend which class to be a checked exception?

⚠ Common exam trap

Test-takers frequently confuse `Throwable` with `Exception` or think that extending `RuntimeException` still produces a checked exception, but the key distinction is that only subclasses of `Exception` (excluding `RuntimeException` and its subclasses) are checked.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Exception

In Java, a checked exception is any exception that is a subclass of `Exception` but not a subclass of `RuntimeException`. To create a custom checked exception, your class must extend `Exception` (or a subclass of `Exception` that is itself a checked exception). This forces callers to handle or declare the exception, enforcing compile-time checking.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Throwable

    Why it's wrong here

    Extending Throwable is possible but not standard; Exception is the intended parent.

  • Error

    Why it's wrong here

    Extending Error creates an unchecked exception, not meant for recoverable conditions.

  • RuntimeException

    Why it's wrong here

    Extending RuntimeException creates an unchecked exception.

  • Exception

    Why this is correct

    Any class that extends Exception (and not RuntimeException) is a checked exception.

About these practice questions

Courseiva writes every 1Z0-811 question from scratch — 481 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.