DRAFT
Observed
Java implicitly produces implementations of any methods a class inherits from the interfaces it implements
Java does not implicitly produce implementations of any methods a class inherits from the interfaces it implements
The word “implements” means that we, the author of the class, have to provide those implementations.
interface I {
public abstract void m1();
public abstract void m2();
}
class C implements I {
}
The above code won’t compile. We have to provide the implementations ourselves:
interface I {
public abstract void m1();
public abstract void m2();
}
class C implements I {
public void m1() { /* our implementation */ }
public void m2() { /* our implementation */ }
}