September 2011
Beginner
650 pages
15h 47m
English
In a class hierarchy, when a method in a subclass has the same return type and signature as a method in its superclass, then the method in the subclass is said to override the method in the superclass. When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the subclass. The version of the method defined by the superclass will be hidden. Consider the following:


When show( ) is invoked on an object of type B, the version of show( ) defined within B is used. That ...
Read now
Unlock full access