The ? (ternary condition) operator is a more efficient form for expressing simple if statements. It has the following form:
It simply states:
if expression then expression
else expression
For example to assign the maximum of a and b to z:
which is the same as: