Integer a = 100, b = 100;
Integer c = 1000, d = 1000;
System.out.println(a == b);
System.out.println(c == d);
The output of the above code is:
true
false
Can someone explain why so?
Integer a = 100, b = 100;
Integer c = 1000, d = 1000;
System.out.println(a == b);
System.out.println(c == d);
The output of the above code is:
true
false
Can someone explain why so?