Sorry for the previous post, it is not readable..
i1=2, i2=2: For ASCII value (int -128 to 127), it will compare it as an int value (so gives true).
i1=4000, i2=4000: For other int value, it will pass it as an Integer object as shown in the code (So gives false).
Auto boxing for ASCII value for int works different here.