1Z0-811 Java Basics and Syntax Practice Question
A subclass overrides a method from its superclass. Which annotation should be used to indicate the overriding intention?
⚠ Common exam trap
Many candidates think @Override is mandatory or that it applies to overloading, when in fact it is optional and only for overriding.
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
✓
The @Override annotation is optional but recommended
The @Override annotation is optional in Java; the compiler will still enforce method overriding without it. However, it is strongly recommended because it provides a compile-time check that the method correctly overrides a superclass method, preventing accidental overloading or typos in the method signature.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The @Override annotation is not allowed
Why it's wrong here
It is allowed and recommended.
- ✗
The @Override annotation is used for overloading
Why it's wrong here
Override is for overriding, not overloading.
- ✓
The @Override annotation is optional but recommended
Why this is correct
It helps catch errors if the method does not override.
- ✗
The @Override annotation is mandatory
Why it's wrong here
It is optional, not mandatory.
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.