why HashMap extends AbstractMap and implement Map ? is extending AbstractMap not sufficient, because AbstractMap implements Map?
It is redundant. I suspect that it was done for "documentation" reasons. HashMap implements Map, and you can rely on that. The fact that it extends AbstractMap is arguably just an implementation detail. (Though it's extremely unlikely that future versions of HashMap would not extend AbstractMap, since there probably some code out there that expects HashMap to be assignable to AbstractMap.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With