The conditional operator ?:
uses the boolean
value of its first operand to decide which of the other two expressions will be evaluated. (See §15.25, "Conditional Operator ? :
" of the Java Language Specification [JLS 2011].)
The general form of a Java conditional expression is operand1 ? operand2 : operand3
.
...
Puzzle 8, "Dos Equis" | |
"Bx: Primitive Value Is Unboxed and Coerced for Ternary Operator" | |
[JLS 2011] | §15.25, "Conditional Operator ? : " |
...