I wonder why Integer objects are done this way.,(reply>), Creating objects is expensive. So Java creates certain Integers only once per runtime. Thus, if you request an boxed Integer (and System.out.printf() requires an Integer, not an int, so you use autoboxing) the Integer class can simply give you a reference to an already existing object for a certain range.