I know there are similar posts on the topic, but they don\'t quite address my question. When you do:
Integer a = 10; Integer b = 10; System.out.println(\"a =
For Integer objects use the a.equals(b) condition to compare.
Integer
a.equals(b)
The compiler will not do the unboxing for you while you compare, unless you assign the value to a basic type.