0

Hello,

How could this be possible:

SuperClass has a method named executeMe(), Subclass1 that extends Superclass has also method named executeMe(), Subclass2 that extends SuperClass has also the same method. When I try to call the executeMe() method from SuperClass, all classes that has been called with the method executeMe() will run without calling the method within the class.

Same concept as of paint(Graphics g) in j2me when a class extends Canvas. Any class that extends Canvas having the method paint() will be automatically called.

Thank you in advance!

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by musthafa.aj
0

parameters in the method may differentiate your calling..

try to look difference between overloading and overriding..

than you know what to do..

0

parameters in the method may differentiate your calling..

try to look difference between overloading and overriding..

than you know what to do..

Thank you! :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.