title: Why there is other situation when key's hashcode has three situation for greater than or less than or equals to?
body: <p>There is some code in <code>java.util.HashMap.TreeNode#putTreeVal()</code>, just like below:</p>
  
  <pre><code>if ((ph = p.hash) &gt; h)
      dir = -1;
  else if (ph &lt; h)
      dir = 1;
  else if ((pk = p.key) == k || (k != null &amp;&amp; k.equals(pk)))
      return p;
  else if ((kc == null &amp;&amp;
            (kc = comparableClassFor(k)) == null) ||
           (dir = compareComparables(kc, k, pk)) == 0) {
      if (!searched) {
          TreeNode&lt;K,V&gt; q, ch;
          searched = true;
          if (((ch = p.left) != null &amp;&amp;
               (q = ch.find(h, k, kc)) != null) ||
              ((ch = p.right) != null &amp;&amp;
               (q = ch.find(h, k, kc)) != null))
              return q;
      }
      dir = tieBreakOrder(k, pk);
  }
  </code></pre>
  
  <p>There have two situation: <code>h</code> less than <code>ph</code>, <code>h</code> greater than <code>ph</code>. 
  Usually, the code <code>(pk = p.key) == k || (k != null &amp;&amp; k.equals(pk))</code> means <code>h</code> equals to <code>ph</code>, but i don't know why there still else if after that. </p>
  
  <p>What is the situation when two objects's <code>hashCode</code> is equals to each other, but <code>==</code> and <code>euqlas()</code> will get false?</p>
  
  <p>When Object's class override <code>equals()</code> method will cause this situation? But i used heard that override <code>equals()</code> must override <code>hashCode()</code> too, so this question wouldn't happen to.</p>
  
  <p>I hope some people could tell me which situation will cause the third <code>else if</code>.</p>