Hi all,
When a child class overrides a method in the parent class, they sometimes override the method completely, and they sometime call super to use the parent class's method as well.
I have a class where I completely want to override the parent's version of the method, but I do want to call super on the grandfather's method. Is this possible?
I've tried
public void myMethod(){
MyGrandfather.super.myMethod();
// do something else
}
and
public void myMethod(){
((MyGrandfather)this).myMethod();
// do something else
}
but neither seems to work (the first doesn't compile, the second fails at runtime.
Any suggestions?
Thanks!
Time