title: compareTo with primitives -> Integer / int
body: <p>Is it better to write</p>
  
  <pre><code>int primitive1 = 3, primitive2 = 4;
  Integer a = new Integer(primitive1);
  Integer b = new Integer(primitive2);
  int compare = a.compareTo(b);
  </code></pre>
  
  <p>or </p>
  
  <pre><code>int primitive1 = 3, primitive2 = 4;
  int compare = (primitive1 &gt; primitive2) ? 1 : 0;
  if(compare == 0){
      compare = (primitive1 == primitive2) ? 0 : -1;
  }
  </code></pre>
  
  <p>I think the second one is better, should be faster and more memory optimized. But aren't they equal?</p>