Multiple choice technology programming languages

What is result of the question Integer i1=10; Integer i2=10; (i1!=i2)-->result is

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Java caches Integer objects for small values between -128 and 127. Since both i1 and i2 are initialized to 10, they reference the exact same cached object instance in memory, making i1 == i2 true. Consequently, the expression i1 != i2 evaluates to false.