Let us say I have the following:
class A //base class
class B extends A
class C extends B
Can I do a override A with C ? I know we can override A with B.
Thanks!
Let us say I have the following:
class A //base class
class B extends A
class C extends B
Can I do a override A with C ? I know we can override A with B.
Thanks!
In reply to Verif Engg:
Yes.
In reply to dave_59:
Thank you Dave! So, once I override A with C, when I call super.body(), the body() method of B gets called?
In reply to Verif Engg:
super.anything looks for anything in the in the closest base class. So if B has a body() method, it refers to that. Otherwise of there is. no body() method in B, it looks in A for a body method.