Java   View all facts   Glossary   Help | 
| syntactic unit > symbol > operator > ?: | 
| ?: comparison table | ||||||||||
| Subject | shorten | have syntax | has definition | have purpose | have | is a synonym of | is a kind of | return | is partitioned into | is an instance of | 
|---|---|---|---|---|---|---|---|---|---|---|
| operator | A symbol used for arithmetic and logical operations | to perform a simple function of 1 to 3 arguments | precedence | symbol | a value called its result | arithmetic operator , relational operator, logical operator, bitwise operator, logical operator, assignment operator | ||||
| tertiary operator | An operator that has 3 arguments | to perform a simple function of 1 to 3 arguments | precedence | operator | a value called its result | |||||
| ?: | code but can also make code harder to understand | expression ? op1 : op2  | to evaluate the expression on the left and return one value if the expression is true and a different value if the expression if false | right to left associativity | conditional operator | the value of the selected expression | tertiary operator | 
Next operator: arithmetic operator     Up: operator, tertiary operator    Previous operator: .