I do not have a java compiler and I would like to check how treats java the comparison of Integer Objects with primitives. Can someone confirm that the results of the following comparisons are correct:
Integer a = 500;
long b = 500;
a == b //-> false
a.equals(b) //-> true
Is it generally true that in the first type of comparison java does Boxing and in the second Unboxing and compares primitive values?