I do not understand why line marked //1 calls the subclass's f_() method instead of the superclass's ? Thanks Pho
posted 15 years ago
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.