I have a very basic doubt about Java Interfaces and inheritance. Suppose I have two classes A and B and one interface C with following definitions
interface C{ public void check(); } class A implements C{ public void check(){ System.out.println("A"); } } class B extends A implements C{ // Is the following method overriding the method from class A or implementing the method from C? public void check(){ System.out.println("B"); } } I am confused that whether it is over-riding or implementation of check() method in class B?
checkinBimplements the method in interfaceCbut it overrides the existing implementation in superclassA.