Question OOP-POLY-0073
HardWhat is covariance in method overriding?
- A.
Return types must be identical
- B.
Methods may change names
- 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
What is covariance in method overriding?
Return types must be identical
Methods may change names
Sign up free to see the answer and a step-by-step explanation.
An override may return a subtype of the parent method's return type
An override may take a supertype parameter