When I was seeing the declaration of ArrayList

class ArrayList<E> extends AbstractList<E>
    implements List<E>, RandomAccess, Cloneable, java.io.Serializable

which implements List interface even though ArrayList's superclass AbstractList implements the same List interface.

abstract class AbstractList<E> extends AbstractCollection<E> implements List<E>

Similar declarations can be found on HashMap, LinkedHashMap declarations also.

enter image description here

In the declaration of LinkedHashMap, it implements Map interface only and not the other interfaces implemented by its superclass HashMap.

So there might be some benefits of having such declarations.

Edit
Report