|
|
|
|
Subclass and Superclass Objects as Method ParametersIt is possible (and actually a very common practice) to declare a method with one or more parameters of superclass types, and then actually pass subclass objects. For example, imagine that we had an expanded class hierarchy:
and we also will make some modifications to the existing Manager class. |
|
This page was last modified on 02 October, 2007 |