InterviewSolution
Saved Bookmarks
| 1. |
Why is downcasting possible in any language?(a) Because inheritance follows has-a relationship(b) Because inheritance follows is-a relationship(c) Because inheritance doesn’t follow any relationship(d) Because inheritance is not involved in castingI had been asked this question in homework.My doubt stems from Downcasting topic in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» Right option is (b) Because inheritance follows is-a relationship |
|