Following is what I have written. Line 5 and line and line 8 should be same as
true
but they are different. I am not able to figure out what is actually happening. Help
public static void main(String[] args)
{
Integer i1 = 127;
Integer i2 = 127;
System.out.println(i1 == i2); //Shows true
Integer i3 = 128;
Integer i4 = 128;
System.out.println(i3 == i4); // shows false
}