Mega Code Archive

 
Categories / Java / Reflection
 

Retrieving other information through the class pointer

public class Main {   public static void main(String[] argv) throws Exception {     Class cc = null;     cc = Main.class;     System.out.println("The name of the superclass is " + cc.getSuperclass());     System.out.println("Is SalariedEmployee an interface? " + cc.isInterface());   } }