1Z0-811 Object-Oriented Programming Practice Question
A Java application uses an interface 'Drawable' with a default method 'draw()'. A class 'Circle' implements Drawable but does not override draw(). Another class 'Square' implements Drawable and overrides draw(). Which statement is true about calling draw() on instances of Circle and Square?
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 will use the default, Square will use its own
When a class implements an interface with a default method, the class inherits the default implementation unless it overrides the method. Circle does not override draw(), so it uses the default implementation from the Drawable interface. Square overrides draw(), so it uses its own version. Option B is incorrect because Square uses its own method, not the default. Option C is incorrect because Square does not use the default. Option D is incorrect because both classes compile successfully.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Circle will use the default, Square will use its own
Why this is correct
If a class does not override a default method, it inherits the default.
- ✗
Square will use the default, Circle will cause a compilation error
Why it's wrong here
Circle does not need to override; default methods are optional to override.
- ✗
Both will use the default implementation
Why it's wrong here
Square overrides the default method, so it uses its own implementation.
- ✗
Both will cause a compilation error
Why it's wrong here
Default methods are valid, and both classes compile.
Go deeper
Related to this question
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 →
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.