R
rlnasr
Check this out...
If you execute this code you would think that you get 4 entries in the
Hashtable, however only three entries are present. I am using jdk
1.5.0_09. I observed the same kind of bug with Hashmap as well.
What seems to be happening is the final "put" for the "FAX" key is
overwriting the first "DESC" entry. Very very strange. Does anyone
know what may be happening here?
java.util.Hashtable hashtable = new java.util.Hashtable();
hashtable.put("DESC", Boolean.FALSE);
hashtable.put("ATT", Boolean.FALSE);
hashtable.put("POST", Boolean.FALSE);
hashtable.put("FAX", Boolean.FALSE);
return hashtable;
If you execute this code you would think that you get 4 entries in the
Hashtable, however only three entries are present. I am using jdk
1.5.0_09. I observed the same kind of bug with Hashmap as well.
What seems to be happening is the final "put" for the "FAX" key is
overwriting the first "DESC" entry. Very very strange. Does anyone
know what may be happening here?
java.util.Hashtable hashtable = new java.util.Hashtable();
hashtable.put("DESC", Boolean.FALSE);
hashtable.put("ATT", Boolean.FALSE);
hashtable.put("POST", Boolean.FALSE);
hashtable.put("FAX", Boolean.FALSE);
return hashtable;