Hi Austin,
If you create the integer like
It creates the integer object by auto boxing.When you create the Integer from -128 to 127 by using the above syntax, it creates the object in the constant pool like create the
string in string literal pool.
If you create the Integer with the value more than 127,it creates the object in the heap.So at the time of check equality using == it returns false.
The above rule is applicable for Byte and Short also.But not applicable for Float and Double.