Following code snippet gets some useful information related to the class.

Java Code:
System.out.println("Package name: " + MainClass.class.getPackage().toString());
System.out.println("Is interface: " + MainClass.class.isInterface());
System.out.println("Modifier: " + MainClass.class.getModifiers());