We are already familiar with boxing and auto boxing of wrapper to premitives and vice-verse.
See the below example.
Integer integer1=127;
Integer integer2=127;
System.out.println(integer1==integer2);//The output will be true.
But as we increase the value from 127 to 128 you will see the output is different.
Integer integer1=128;
Integer integer2=128;
System.out.println(integer1==integer2);//The output will be False.
As per JLC the boxed value returns true for int or short in the range of -128 to 127(included). It also returns true for a byte or a char in the range of \u0000 to \u007f.
See the below example.
Integer integer1=127;
Integer integer2=127;
System.out.println(integer1==integer2);//The output will be true.
But as we increase the value from 127 to 128 you will see the output is different.
Integer integer1=128;
Integer integer2=128;
System.out.println(integer1==integer2);//The output will be False.
As per JLC the boxed value returns true for int or short in the range of -128 to 127(included). It also returns true for a byte or a char in the range of \u0000 to \u007f.