Courseiva
Object-Oriented ProgramminghardMultiple ChoiceObjective-mapped

1Z0-811 Object-Oriented Programming Practice Question

Given: abstract class Shape { abstract void draw(); } class Circle extends Shape { void draw() {} } Which is true?

⚠ Common exam trap

It's easy for candidates to think abstract classes cannot have constructors (option A) or that overriding methods must always be public (option D), but the Java specification allows constructors in abstract classes and only requires the overriding method to have at least the same access level as the abstract method.

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

Circle must override draw()

Circle is a concrete class that extends the abstract class Shape, which declares the abstract method draw(). A concrete subclass of an abstract class must provide an implementation for all inherited abstract methods, unless the subclass is also declared abstract. Circle provides an implementation of draw() with an empty body, which satisfies the override requirement.

Answer analysis

Option-by-option breakdown

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

  • Shape cannot have a constructor

    Why it's wrong here

    Abstract classes can have constructors, invoked via super().

  • Circle must override draw()

    Why this is correct

    Circle provides implementation; it compiles fine.

  • Shape s = new Shape(); is valid

    Why it's wrong here

    Cannot instantiate abstract classes.

  • draw() must be public in Circle

    Why it's wrong here

    The overriding method can have the same or broader access; not necessarily public.

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.