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
  • 8,408
  • 6
  • 59
  • 101
Poorna Senani Gamage
  • 1,246
  • 2
  • 19
  • 30

0 Answers0