Get Access Specifiers and Modifiers of a Class

It is advised to read the notes on Java Reflection API before attempting the programs. Example to get Access Specifiers and modifiers of a class. import java.awt.Button; import java.lang.reflect.Modifier; public final class Demo { public static void main(String [] args) { Demo d1 = new Demo(); System.out.println(“Object d1 belongs to ” + d1.getClass()); // prints …

Get Access Specifiers and Modifiers of a Class Read More »