abstract class A { abstract void foo(); } abstract class B extends A { void foo() { this.foo(); } } abstract class C { void foo() { this.foo(); } }