Introduction to OOP | Chapter 10: Subclasses and Subtypes: | next | previous | audio | real | text |
Recall the argument that asserted a child class has the same behavior as the parent, and thus a variable declared as the parent class should in fact be allowed to hold a value generated from a child class.
But does this argument always hold true?