HashMap entries disappear !!
807605Jul 22 2007 — edited Jul 22 2007Hey Guys,
This is my code snippet:
HashMap map = null;
try{
-- map = new HashMap();
--connect to DB
while(rs.next()){
// do some calculations...etc..etc..
map.put(x,y);
}
}catch(xxxx)
return map;
} //method closes
On the line map.put(..) I can see that the items do get inserted into the map.
When I do map.size() before return map, it shows size=1 where as map.put was called four times , hence four items were inserted.
Any clues ??
thanks !
AZ