Java Object <= relational operator check
<p>In Java, when two objects are compared using ==, their references are also compared. But what happens when they are compared using other relational operators? For instance:</p>

<pre><code> Integer a = new Integer(10);
 Integer b = new Integer(9);
 if (a &gt;= b) {
  System.out.println("A is greater");
 }
</code></pre>

<p>When I run this, I get output as A is greater, why so? Do references not get compared or they do and it's just a coincidence?</p>

<p>Also, if one of the arguments is primitive, does the non-primitive one get unwrapped to primitive for such comparisons?</p>