The Collection interface extends Iterable . An abstract superclass implements methods common to several classes, in the case of lists it has an AbstractList with each specific class (say, ArrayList or LinkedList ), providing specific implementation details.
In fact, you guessed it, inheritance is used to reduce code duplication. But precisely because of this, all subclasses will contain the same operations that are defined in superclasses, implementation details common to several classes will be displayed only once in the class hierarchy at the abstract class level, and they are not yet “defined” into subclasses - only changes that change are redefined in specific subclasses.
Óscar López
source share