3 ms·
A bit more subtle than that- Java reserves singleton instances of Integer for values in the range -128 to 127. In these cases, the Integers will contain the sam
by RodgerTheGreat 16y ago
A bit more subtle than that- Java reserves singleton instances of Integer for values in the range -128 to 127. In these cases, the Integers will contain the same value and refer to the same object, so == works. It's not actually undefined behavior.