Java has a short hand way by using ? : the ternary aka conditionaloperator for doing ifs that compute a
value. Unlike the ifstatement, the conditional operator is an
expression which can be used for
It is good form if the types of the true and false possibilities in the ternary
expression match each other and the target, otherwise you may get some surprises when
Java coerces types to match.