i wanted to clarify about a piece of code, I am not understanding properly..
pasting only relevant parts of code:
in the last case, i am asking it -> m.get(new Dog("clover"))
so the constructor of Dog is called with the name as clover and is returned to m.get method.. why isn't the equal method happy with the object? from where is d1 coming into picture there even if I am not sending a d1?