Answer: Yes. The following code compiles and runs with no problem.

class B {  public void f() { System.out.println("Hello"); } }

interface C {  public void f(); }

class D extends B implements C {
   public void f() { System.out.println("Goodbye"); }
}

public class A {
   public static void main (String arg[]) {
      D d = new D();
      d.f();
   }
}