Java   View all facts   Glossary   Help
syntactic unit > symbol > operator > tertiary operator
Next operatorunary operator    Upoperator    Previous operatorshort circuit operator   

tertiary operator comparison table
Subject evaluate before shorten evaluate to have syntax be part of have purpose have have syntax rule is a subtopic of is a synonym of return is an instance of
?:another operator with lower precedencecode but can also make code harder to understandits result
expression ? op1 : op2
an expressionto evaluate the expression on the left and return one value if the expression is true and a different value if the expression if falseright to left associativity
bold = mandatory
italic = non-terminal
normal font = optional
Operatorsconditional operatorthe value of the selected expressiontertiary operator

Next operatorunary operator    Upoperator    Previous operatorshort circuit operator