This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, overriding is resolved at Runtime. Since your Runtime object is over1(subclass), and also the getD method is overriden in over1 class, so it calls over1's (subclass) getD method. Further the getD method calls method1 which is shadowed in over1(subclass) so method1 of over1 is called which prints: "Sub Class"
Hope I am not wrong
Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?