wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes HashTable and HashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HashTable and HashMap" Watch "HashTable and HashMap" New topic
Author

HashTable and HashMap

Saurabh Saha
Ranch Hand

Joined: Dec 08, 2004
Posts: 52
Hi All,
Please tell me three difference between HashMap and HashTable. I know two difference. please tell me what is third one.
1.Synchronization
2.Null key and value
3.???

Thanks,
Vivek
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

Since this looks very much like a homework question, I don't want to give the answer straight out. However, let me see if I can point you in the right direction.

It looks like you pulled the first two answers from the HashMap class' description in the Java API documents (i.e. the JavaDocs). The third answer is not directly verbalized in the text. But if you carefully compare the HasMap & HashTable entires, the answer is there. Also take a look at this JavaWorld article. From that you should be able to determine what another big difference between HashTable and HashMap is.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HashTable and HashMap