I have 2 classes Parent and Child. Both the classes contain method myMethod. I’m creating the object of Child class in the another class ClassA. My issue is I need the call the myMethod of the Parent class using the object of Child class from class ClassA.
Hope I could convey my doubt properly.
You can’t directly call a super class method of an object from outside of its class. To be honest, the fact that you need to do this is a code smell. Rethink your design.
If you add some detail as to why you are trying to do this, we might be able to help.