Log in

View Full Version : Java's "super" keyword...


Typhoon
07-18-2005, 01:38 AM
Is...

super.super.super.Display();

usable if someone wants to use a member method high high high up in the inheiretence hiearchy?

Janak Parekh
07-18-2005, 01:53 AM
It'll work, in theory. But if you have code looking like that you seriously need to take a hard look at your OO design. (Remember that you only need refer to super if the Display method is overloaded. And if it's overloaded so far away, there might be a good reason for it.)

--janak