This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HashTable and HashMap" Watch "HashTable and HashMap" New topic

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.
2.Null key and value

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.
Consider Paul's rocket mass heater.
subject: HashTable and HashMap
Similar Threads
HashMap Vs HashTable
what's the difference between hashtable and hashMap
HashMap confused
Java Collection
HashTable and HashMap