title: What is the purpose of hashcode method in java?
body: <p>When we have <code>equals()</code>, <code>compareTo()</code> methods why there is a <code>hashcode()</code> method in Java? </p>
  
  <p>And in case if we use  <code>HashTable</code> we have to override <code>hashcode()</code> method, Is there any special reason except fast accessing of random keys? If we override the <code>hashcode()</code> method what would be the probable implementation ?</p>
  
  <p>How Java ensures object uniqueness in memory?</p>
  
  <hr>
  
  <p><code>Hashcodes are typically used to enhance the performance of large collections of data</code>.</p>
  
  <p>In <code>hashing</code> we calculate <code>hash code</code>. it's an additional task. When we do additional operation for each object that is added to a collection. How the performance gets improved? </p>