Autoboxing


Integer a = 1000, b = 1000;
System.out.println(a == b); // false

// WARNING: JVM tries to save memory
// when the Integer falls in a range (from -128 to 127).
Integer c = 100, d = 100;
System.out.println(c == d); // true