Class modifier: public, abstract or final


import java.lang.reflect.Modifier;

public class Main {

  public static void main(String[] args) {
    String o = new String();
    Class c = o.getClass();
    int m = c.getModifiers();
    if (Modifier.isPublic(m))
      System.out.println("public");
    if (Modifier.isAbstract(m))
      System.out.println("abstract");
    if (Modifier.isFinal(m))
      System.out.println("final");
  }
}
Home 
  Java Book 
    Runnable examples  

Reflection Class:
  1. Class modifier: public, abstract or final
  2. Class simple name plus package name
  3. Create new instance
  4. Class reflection, all methods, constructors, parameters, interfaces
  5. Get super class name
  6. Get the class By way of .class
  7. Get unqualified class Name
  8. Is Type Compatible
  9. Is Primitive type
  10. Load a class given its name.