Q. What will be the output?
Code:
Integer a = 127; Integer b = 127; System.out.println(a == b);
β
Correct Answer: (A)
true
Explanation: Integer cache works for values -128 to 127, so both refer to same object.