I do not understand why line marked //1 calls the subclass's f_() method instead of the superclass's ? Thanks Pho
Joined: Aug 26, 2000
Since f_() method is overridden in Child it will get called if the Object is Child no matter where. Becuase of late binding at runtime the method that will be called depends on the acutally Object. Since Child is in used and it has f_() this method will get called.