filmov
tv
Learn Java Programming - Ternary Operator ? : Tutorial

Показать описание
The conditional ternary operator is used to assign a value to a variable based on the result of a conditional test. The result of the conditional test must equal true or false. Surrounding the conditional test with parentheses is optional, however, doing so will improve readability. A complete ternary statement must have three punctuation marks: = ? :