1Z0-811 Java Basics and Syntax Practice Question
A parent class has a static method display() and an instance method show(). A child class attempts to override both. What is the outcome?
⚠ Common exam trap
Test-takers frequently confuse method hiding with overriding, assuming static methods follow the same polymorphic rules as instance methods, leading them to incorrectly select option A or C.
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
✓
Only show() can be overridden
In Java, static methods belong to the class, not instances, so they cannot be overridden—they can only be hidden. Instance methods, however, can be overridden to provide polymorphic behavior. Therefore, only the instance method show() can be overridden; display() is hidden, not overridden.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Both will be overridden
Why it's wrong here
Static methods cannot be overridden.
- ✓
Only show() can be overridden
Why this is correct
Instance methods are overridden; static methods are hidden.
- ✗
Only display() can be overridden
Why it's wrong here
Static methods cannot be overridden.
- ✗
Neither can be overridden
Why it's wrong here
Instance methods can be overridden.
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.