posted 15 years ago
an interface is a contract - nothing else. When you have
Interface A {}
you are saying "here are the rules for what it means to implement the 'A' interface.
When you say "implements A", you are saying "This class/abstract class will implement everything required by the A interface"
so,
interface B extends A
is just saying "here are the rules for implementing the B interface, which by the way, must also implement the A interface."
and "Class C implements B" is just saying "I promise that the C class will implement everything required by the B interface (which just so happens to also require implementation of the A interface".
it's not really inheritance at all.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors