This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
but operator <=, <, > and >= all passed compiling, only == and != fail. what's the reason behind this? it looks to me that == and != don't do unboxing, they just compare two objects directly and fail because type mismatch. while <=, <, > and >= do auto-unboxing and compare the primitive type value. Am I right?
It's all rather messy because 42 == Integer.valueOf(42); does work. The object is unboxed. It all means that you have to pay a greater deal of attention to any code involving these wrapper objects. Instead of compiler options like -source = 1.5 I wish they had done something like they did with assertions: -enable-boxing/-disable-boxing.