The Artima Developer Community
Sponsored Link

Java Answers Forum
Hash Map

3 replies on 1 page. Most recent reply: Mar 19, 2005 8:44 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Lal Bahadur

Posts: 2
Nickname: la19
Registered: Mar, 2005

Hash Map Posted: Mar 17, 2005 10:38 PM
Reply to this message Reply
Advertisement
We can have one null keys and null value in HashMap but not in Hashtable?What thr reason behind it ?


Lal Bahadur

Posts: 2
Nickname: la19
Registered: Mar, 2005

Re: Hash Map Posted: Mar 17, 2005 10:41 PM
Reply to this message Reply
Because its not syncronized whereas Hastables are synchronized.

Rajagopal

Posts: 3
Nickname: rajagopaly
Registered: Mar, 2005

Re: Hash Map Posted: Mar 18, 2005 3:38 AM
Reply to this message Reply
What's The Relationship between having null values/keys and Synchronization?

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Hash Map Posted: Mar 19, 2005 8:44 PM
Reply to this message Reply
A HashMap allows more than one null value. Naturally, it allows only one particular key value once, whether it is null or anything else, otherwise there's a serious bug in it.

And as Rajagopal says, what would that have to do with threading? Don't want two threads working on the null value at the same time? ;)

Flat View: This topic has 3 replies on 1 page
Topic: Using Java to Refresh a Materialized view Previous Topic   Next Topic Topic: need help again

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use