A demonstration of abstract. : Abstract Class « Class Definition « Java Tutorial






abstract class A {
  abstract void callme();

  void callmetoo() {
    System.out.println("This is a concrete method.");
  }
}

class B extends A {
  void callme() {
    System.out.println("B's implementation of callme.");
  }
}

class AbstractDemo {
  public static void main(String args[]) {
    B b = new B();

    b.callme();
    b.callmetoo();
  }
}








5.28.Abstract Class
5.28.1.Abstract Classes
5.28.2.A demonstration of abstract.
5.28.3.Using abstract methods and classes.