dileep keely wrote:I am not able to figure out when I put an object as a key into a map and retrieve it I will get corresponding value,but
when I put a reference pointing to an Object as a key into a map and retrieve I get null as value.
Intentionally I didn't add equals()..
There is no such distinction as "put an object as key" and "put a reference pointing to an Object as a key". In both cases, you are passing a reference to an object to the map, but in one case, you are using a declared reference, and in the other, the compiler is creating an anonymous reference for you.... ie. there is little difference between...
and...
Henry