Java has a Reflection API, which you can use to determine the base class of any class that you have, as well as for any interfaces that a particular class implements. However, determining which classes inherit from this class will be a bit more complicated. The reflection API also allows you to do many other things, as well as determine what the members of this class are, and even call methods of that class, etc.
public void DisplaySuperClass(Class c) { System.out.println(c.getSuperclass().getName()); }
helloworld922
source share