title: Why is the default hashcode() in java bad?
body: <p>if I remember correctly the default hashCode() implementation in java of an object of type Object() is to return the memory address of the object.  When we create our own classes, I read that we want to override hashCode() so that when we insert them into a hash related collection like HashMap() it will work properly.  But why is a memory address bad? </p>
  
  <p>Sure we will EVENTUALLY run out of memory and you'll have collisions, but the only case where I see this being a problem is where you are dealing with TONS of data and have very little memory, and then it would START to affect performance because hash related collections in java resolve collisions by chaining(a bucket will link to a list of values that resolved to the same hashcode/index).</p>