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?