max = (a > b) ? a : b;
(a > b) ? a : b; is an expression which returns one of two values, a or b.
The condition, (a > b), is tested. If it is true the first value, a, is returned. If it is false, the second value, b, is returned.
Whichever value is returned is dependent on the conditional test, a > b. The condition can be any expression which returns a boolean value.