This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
/* in statement b==20, b will be unboxed to byte or 20 will be boxed to Byte */
Definitely primitive is not going to be boxed before comparison. b will be unboxed before comparison. It is the only way keep this rule OK. == comparison results true if one wrapper and another primitive comprises same value. And this comparison is done after unboxing the wrapper. This will always result true.