Forums Register Login

Accessing the base class methods in child class.

+Pie Number of slices to send: Send
Hi,

Below is the code snippet. I want to call the func1() of class A in class C. if I use super.func1(), the class B method will be called. But I want to call func1() of class A. Can any one tell me how to call the func1() in class C in proper way.

+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
There is already a discussion about that. Check Invoke Grand-Parent Method
+Pie Number of slices to send: Send
 

Sebastian Janisch wrote:There is already a discussion about that. . . .

Good idea to quote that discussion. I seem to remember that thread also says such coding would be bad design.
Ruth Stout was famous for gardening naked. Just like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1456 times.
Similar Threads
static methods
How to Access Object !!!!
Java - C++ differences in function overriding
How to call "super.super.methodName()"
redefining inherited fuctions, what gets called then ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:40:41.