Thanks for your replies and sorry: I missed an important bit of information in my question.
I meant to say: What happens when two objects
whose hashCode method has not been overriden and therefore inherit the hashcode method from Object and are equal according to equals() are used as keys in order to store values into a HashMap.
1. What happens when one tries to put the second key/value into the HashMap?
My answer: it works fine insofar as the hashcode method from Object returns a unique id.
2. What happens when one tries to get the second key from the HashMap?
This is where your comments are welcome.
You'll always learn more by experimenting than just being told the answer.
Joanne, I do know experimenting is a good way to learn. However sometimes exchanging with others can be stimulating and interesting as well...
Julien.