In a hierarchical chain of classes where each one extends the previous, and overrides the same function lets say foo(), how would you call a foo from several steps up the chain, were super.foo() would only call 1 above.
Code:
---------
class A
{
foo(){}
}
class B extends A
{
foo(){}
}
class C extends B
{
foo(){}
}
class D extends C
{
foo(){}
}
D obj = new D();
---------
How could obj call foo defined in B or A?
Read More...
No comments:
Post a Comment