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.
For C/C++, if you accidentally used "=" (assignment) instead of "==" (comparison), it will assign the value, and still have a valie that can be used in the condition. Thia made for some really obscure bugs. Reversing it fixed the problem, as you can assign a variable to a literal (null).
For Java, it doesn't matter as you can't use null as a boolean (implicitedly).
Henry [ April 25, 2008: Message edited by: Henry Wong ]