It will mainly be compiled into:
Integer i = Integer.valueOf(NumberUtils.INTEGER_ONE);
Assuming INTEGER_ONE declared as int .
At run time, if INTEGER_ONE is 1, it will actually return a reference to the same object every time, guaranteed by the Java language specification, because it is in the range from -128 to 127. Values ββoutside this range can return references to one the same object, but not necessary.
source share