How can I properly compare two Integers in Java?
I know that if you compare a boxed primitive Integer with a constant such as: Integer a = 4; if (a < 5) a will automatically be unboxed and the comparison will work. However, what happens when you are comparing two boxed Integers and want to compare either equality or less than/greater than? Integer a = 4; Integer … Read more