title: Java JIT and boxing
body: <p>I came across code written by a colleague:</p>
  
  <pre><code>return new Integer(_hash).compareTo(other.getHash());
  </code></pre>
  
  <p>and I am wondering if Java can optimize this avoid the boxing and simply compare the two integers. Does it do that (in Java 7 or 8), or does it continue creating an Integer and calling compareTo() each time?</p>