title: Boxed Primitives and Equivalence
body: <p>So I was asked this question today.</p>
  
  <pre><code>Integer a = 3;
  Integer b = 2;
  Integer c = 5;
  Integer d = a + b;
  System.out.println(c == d);
  </code></pre>
  
  <p>What will this program print out?  It returns true. I answered it will always print out false because of how I understood auto (and auto un) boxing.  I was under the impression that assigning Integer a = 3 will create a new Integer(3) so that an == will evaluate the reference rather then the primitive value.</p>
  
  <p>Can anyone explain this?</p>