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!

parameters in the method may differentiate your calling..

try to look difference between overloading and overriding..

than you know what to do..

parameters in the method may differentiate your calling..

try to look difference between overloading and overriding..

than you know what to do..

Thank you! :)

if it is useful then add reputation point for me and mark as solved...

Thank you!!!!!!!!!!!:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.