title: What's the implementation of hashCode in java Object?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2427631/how-is-hashcode-calculated-in-java">How is hashCode() calculated in Java</a>  </p>
  </blockquote>
  
  
  
  <p>I found there's no implementation in <code>hashCode(）</code> method of root class <code>Object</code> in Java:</p>
  
  <pre><code>public native int hashCode(); 
  </code></pre>
  
  <p>If I have an <code>Object a</code> and an <code>Object b</code>, how can I know the <code>a.hashCode()</code> and <code>b.hashCode()</code> value without using <code>System.out.println()</code>? Just by the <code>hashCode</code> implementation.</p>
  
  <p>I have try to <code>new</code> two <code>ArrayList</code> objects and to my big surprise the <code>hashCode()</code> values are the same: both of them are 1.</p>