jeudi 9 novembre 2017

Why both implements and extends? [duplicate]

This question already has an answer here:

Take LinkedHashMap as example. Why it is defined as:

public class LinkedHashMap<K,V>
extends HashMap<K,V>
implements Map<K,V>

HashMap already implements Map<K,V>. But why LinkedHashMap implements Map<K,V> again?

Does it means that, LinkedHashMap will override some method from Map, which behaves quite different from HashMap methods?

Aucun commentaire:

Enregistrer un commentaire