可能重複:
Java.util.HashMap — why HashMap extends AbstractMap and implement Map?
Why would both a parent and child class implement the same interface?Java:WeakHashMap爲什麼實現Map,而AbstractMap已經實現了它?
WeakHashMap中< K,V>聲明既延長AbstractMap < K,V>和實施地圖<ķ ,V>。
但AbstractMap < K,V>已經實現地圖< K,V>。它看起來像implements
聲明是多餘的。
它被宣佈的原因是什麼?
文件冗餘。 –
請參閱:http://stackoverflow.com/questions/5668429/why-would-both-a-parent-and-child-class-implement-the-same-interface – AFS
您是否在文檔中或在實現本身? – fge