posted 12 years ago
Hi,
I was reading katthy and sierra and i came across this fact that if wrappers objects for example
For integers if the range is in -127-128, the objects are considered to be equal. Now consider the
following example
Considering the above code, in case 1, they are equal, while in case 2, they are no equal. Why? Aren't they in range of -127 to 128.
OR here NEW is creating the magic of creating a new object. Please help, why case1 differs from case 2?
Arhaan