int a = 7, b = 21; a > b ? a : b ;
The expression is evaluated to 21.
The expression found the maximum of two variables:
a > b was false, so(The expression would probably be part of a longer statement that does something with the value.) Here is a program fragment that prints the minimum of two variables.
int a = 7, b = 21; System.out.println( "The min is: " + (a ______ b ? a : b ) );
Other than the blank, the program is correct.
The entire expression counts as one value, so that value
can be used with the concatenation operator "+" in the println().