title: how equal operator works with primitive and object type data
body: <p>I know its a very basic question but I want to be clear about the concept. I want to know how <code>==</code> operator works in case of primitive and object type. For example</p>
  
  <pre><code>Integer a = 1;
  int b = 1;
  System.out.println(a == b)
  </code></pre>
  
  <p>how <code>a</code> is compared with <code>b</code>, whereas <code>a</code> contain the ref of object that contains value 1. Can somebody clearify it to me how it works internally? </p>