This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes HashMap extends AbstractHashMap and also implements Map why? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "HashMap extends AbstractHashMap and also implements Map why?" Watch "HashMap extends AbstractHashMap and also implements Map why?" New topic
Author

HashMap extends AbstractHashMap and also implements Map why?

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 366

Hi All,

I have seen HashMap has extended AbstractHashMap that implements Map interface. But HashMap has also implemented Map. What is the reason behind that?


Pawan Chopra
SCJP - DuMmIeS mInD
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I guess no reason. Maybe for clarity. Anyway it doesn't really matter, it's not like you can double implement an interface.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HashMap extends AbstractHashMap and also implements Map why?
 
Similar Threads
String as key to look up an Integer
LinkedHashMap
LinkedHasMap Question
Objects and Collections
Map and Set