In chapter 3 (K&B Java 5) Page 236 it says that in order to save memory 2 instances of following wrapper objects will always be == when their primitive values are the same: Boolean, Byte, Character from \u000 to \u007f, Short and Integer from -128 to 127. So why does the first comparison return false and second returns true.
I think you may have taken the sentence out of context... This is only true if autoboxing (or the valueOf(int) method) is used. In your example, at line #1, you are *not* using autoboxing, so the instance is not the same instance that is used at line 2 (where autoboxing is used).
If both line #1 and line #2 used autoboxing, then the statement would be true.
Henry