say one of my object implements X interface but is returning false when checking with ‘instanceof’. How to determine what is the super class or an interface of an object. I am looking for something like
for example:
object.getSuperClassORInterface();
Use reflection
use
getSuperClass()for example :
Further you can see whether superClass is
ClassorInterfaceusingisInterface()