equality operator, odd results?
<p>I have a question about the following piece of code:</p>

<pre><code>public class Equivalence {
    public static void main(String[] args) {
        Integer n1 = new Integer(47);
        Integer n2 = new Integer(47);
        System.out.println(n1 == n2);
        System.out.println(n1 != n2);
    }
}
</code></pre>

<p>The resulting output surprised me: </p>

<pre><code>false
true
</code></pre>

<p>I have checked the constructor in Javadoc online, nothing help from there.</p>

<p>Thanks in advance</p>

<p>Thank you </p>
