FileDocCategorySizeDatePackage
SampleCheckInterface.javaAPI DocExample1325Tue Dec 12 18:58:48 GMT 2000None

SampleCheckInterface

public class SampleCheckInterface extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

      Class observer = Observer.class;
      Class observable = Observable.class;
      verifyInterface(observer);
      verifyInterface(observable);
   
static voidverifyInterface(java.lang.Class c)

      String name = c.getName();
      if (c.isInterface()) {
         System.out.println(name + " is an interface.");
      } else {
         System.out.println(name + " is a class.");
      }