Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface ABC {
- public void callme();
- }
- abstract class A implements ABC {
- abstract public void callme();
- void callmetoo() {
- System.out.println("This is a concrete method.");
- }
- }
- class B extends A {
- public 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();
- }
- }
- //OUTPUT:
- //B's implementation of callme.
- //This is a concrete method.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement