I think you are confusing with what had been sayed on this forum a few days ago:
The specification states that "Character from \u0000 to \u007f, Boolean, Short and Integer from -128 to 127" are cached, and hence, will be "==", via boxing when their primitives values are the same.
You obtain i1 via boxing and i2 by calling the constructor. So you cannot apply that rule. The references of the two objects are different. And then
System.out.println(i1==i2); will printed
false.
[ August 15, 2007: Message edited by: Collins Mbianda ]