Base constructor can't know anything about it's children.
Java is my love
Kelvin Chenhao Lim
posted 8 years ago
Originally posted by Andry Dub: Base constructor can't know anything about it's children.
You're right, it doesn't. But thanks to the magic of polymorphism, the Base constructor's call to amethod() will be bound at runtime to the overridden implementation in Derived. In fact, this doesn't only apply to constructors; this is true of any call by a Base method to another Base method, unless the latter cannot be overridden (e.g. if it's final or private).