February 2013
Intermediate to advanced
672 pages
16h 2m
English
The conditional operator ? : uses the boolean value of one expression to decide which of two other expressions should be evaluated.
ConditionalExpression: ConditionalOrExpression ConditionalOrExpression ? Expression : ConditionalExpression
The conditional operator is syntactically right-associative (it groups right-to-left). Thus, a?b:c?d:e?f:g means the same as a?b:(c?d:(e?f:g)).
The conditional operator has three operand expressions. ? appears between the first and second expressions, and : appears between the second and third expressions.
The first expression must be of type boolean or Boolean, or a compile-time error occurs.
It is a compile-time error for either the second or the third operand expression ...
Read now
Unlock full access