2
Integer i3 = 10;
Integer i4 = 10;
System.out.println(i3 == i4);
Integer i5 = 1000;
Integer i6 = 1000;
System.out.println(i5 == i6);

I got output for the above code as,

true
false

I can understand how i3==i4, but what is the reason to i5==i6 become false.

Freiheit
  • 7,925
  • 6
  • 57
  • 99
Poorna Senani Gamage
  • 1,218
  • 1
  • 18
  • 28

0 Answers0