Courseiva
Exception Handling and Development ToolshardMultiple SelectObjective-mapped

1Z0-811 Exception Handling and Development Tools Practice Question

Which THREE statements about custom exceptions in Java are correct? (Select exactly 3)

⚠ Common exam trap

The 1Z0-811 exam often tests the misconception that custom exceptions must directly extend Throwable or that they cannot have constructors calling super, when in fact they can extend any appropriate subclass and commonly do call super to set the message and cause.

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

A checked custom exception must be declared in the throws clause of any method that throws it.

In Java, a checked custom exception (one that extends Exception but not RuntimeException) is a checked exception. The Java Language Specification (JLS) requires that any method which might throw a checked exception must either handle it with a try-catch block or declare it in its throws clause. This ensures the caller is aware of and can handle 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.

  • A checked custom exception must be declared in the throws clause of any method that throws it.

    Why this is correct

    Checked exceptions must be either caught or declared.

  • A custom exception can be either checked or unchecked.

    Why this is correct

    If it extends Exception (but not RuntimeException), it is checked; if it extends RuntimeException, it is unchecked.

  • An unchecked custom exception must extend RuntimeException.

    Why this is correct

    Unchecked exceptions are subclasses of RuntimeException or Error.

  • A custom exception class must directly extend Throwable.

    Why it's wrong here

    Custom exceptions typically extend Exception or RuntimeException, which indirectly extend Throwable.

  • A custom exception cannot have constructors that call super.

    Why it's wrong here

    Custom exceptions commonly have constructors that call super() with a message or cause.

About these practice questions

One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.