class A { public void foo() {} } class Test extends A { @Override public void foo() {} }