Notice the output from Listing 8-1. The ParentClass constructor executed before the ChildClass constructor. I'm a Parent Class. I'm a Child Class. I'm a Parent Class.
Derived classes can communicate with base classes during instantiation.
Listing 8-2 shows how this is done at the child constructor declaration. Sometimes you may want to create your own implementation of a method that exists in a base class. The effect is the Parent print method will not be called, unless we do something special to make sure it's called. Another way to access base class members is through an explicit cast. Remember that a derived class is a specialization of it's base class.