Friday, June 18, 2004


Do anyone thinks , if HashMap.containsKey() returns false, means , the key is NOT mapped in the map? Wrong !!!!!! , Suppose, the state of the Key object changes so that hashcode() now returns different value, after you put your key-value to the map. Now map.containsKey, or map.get will not necessarily return the key-value.

No comments: