Is it an interface


import java.util.Observable;
import java.util.Observer;

public class SampleCheckInterface {

  public static void main(String[] args) {
    Class observer = Observer.class;
    Class observable = Observable.class;
    verifyInterface(observer);
    verifyInterface(observable);
  }

  static void verifyInterface(Class c) {
    String name = c.getName();
    if (c.isInterface()) {
      System.out.println(name + " is an interface.");
    } else {
      System.out.println(name + " is a class.");
    }
  }
}
Home 
  Java Book 
    Runnable examples  

Reflection interface:
  1. Get implemented interfaces
  2. Get Super Interfaces
  3. Is it an interface
  4. Does it implement Serializable interface
  5. Interfaces for a primitive type is an empty array
  6. Superclass of interfaces is always null