This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
This is called the ternary operator. It consists of a boolean expression, followed by ?, followed by an expression, followed by :, and finally another expression.
If the boolean expression before the question mark evaluates to true, the operator returns the expression after the question mark. Otherwise, it returns the expression after the colon.
Here is an example:
This piece of code assigns to max either a or b, whichever is larger. The ternary operator has its uses. The reason your examples shouldn't be used, is because they simply return the outcome of the boolean expression before the question mark, or its inverse.