From the answer to a question about primitive types and autoboxing in java:
for biziclop:
class biziclop {
public static void main(String[] args) { System.out.println(new Integer(5) == new Integer(5)); System.out.println(new Integer(500) == new Integer(500)); System.out.println(Integer.valueOf(5) == Integer.valueOf(5)); System.out.println(Integer.valueOf(500) == Integer.valueOf(500)); }
}
Results in:
C:\Documents and Settings\glow\My Documents>java biziclop false false true false C:\Documents and Settings\glow\My Documents>
Why is that?