Hi Kaushik,
This is the code which i ve been trying.
String str[]={"abc","111","xyz"};
Map map=new HashMap();
for(int i=0;i<str.length;i++)
{
map.put(new Integer(i),str[i] );
System.out.println(map.hashCode());
}
I tried your code changing the objects we put into the map.It gave a diiferent hashCode() then. I think you got the same hashCode() coz
hi.put("","");
hi.put("","");
here the objects we put are same.But How does it work?Coz the key cant be a duplicate one rite?
Thanks,
Maya