Partial interface Implementations

If a class implements an interface but does not fully implement its methods, then that class must be declared as abstract. For example:

 
interface MyInterface {
  void callback(int param);

  void show();
}

abstract class Incomplete implements MyInterface {
  int a, b;

  public void show() {
    System.out.println(a + " " + b);
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.