java multiple ternary operator code example Example: ternary operator java booleanExpression ? expression1 : expression2;