Autoboxing is rather scary. While I fully understand the difference between == and .equals I can\'t but help have the follow bug the hell out of m
==
.equals
Can you imagine how bad performance would be if every Integer carried overhead for internment? Also does not work for new Integer.
Integer
new Integer
The Java language (not a JVM issue) cannot always auto unbox because code designed for pre-1.5 Java should still work.