Bypassing subclass method overrides
Someone in ##java recently asked a question that may come up with beginners to OOP: How to invoke a method of a superclass from the outside. For example, if ChildClass extends BaseClass and overrides BaseClass.method(), how can one invoke the method of the superclass, bypassing the override in ChildClass? This is not a very good idea from an OOP standpoint, because the child class might not expect the parent’s behavior to be invoked...
May 13, 2015 — 4 minute(s) read