title: Why can hashCode() return the same value for different objects in Java?
body: <p>A quote from the book I'm reading <a href="http://www.amazon.co.uk/Head-First-Java-Kathy-Sierra/dp/0596009208" rel="noreferrer">Head First Java</a>:</p>
  
  <blockquote>
    <p>The point is that hashcodes can be the same without necessarily guaranteeing that the objects are equal, because the "hashing algorithm" used in the <code>hashCode()</code> method might happen to return the same value for multiple objects.</p>
  </blockquote>
  
  <p>Why might the <code>hashCode()</code> method return the same value for different objects? Does that not cause problems?</p>