Why Does 1000 == 1000 Return false While 100 == 100 Returns true in Java?
In Java, comparing two Integer objects with == yields false for 1000 but true for 100 because the language caches small integer instances (-128 to 127) via Integer.valueOf, causing both variables to reference the same object only within that range.
