Question OOP-POLY-0051
MediumCan static methods be overridden in Java?
- A.
Only in interfaces
- B.
Only if they are final
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Polymorphism question
Can static methods be overridden in Java?
Only in interfaces
Only if they are final
Sign up free to see the answer and a step-by-step explanation.
Yes, exactly like instance methods
No; a subclass's static method with the same signature hides the parent's