The ?:
operator checks the left-hand side of the expression. If it is not null
,
the left-hand value is the result of the expression. Otherwise, the right-hand value
is the result of the expression. This basically says "use this value,
unless it is null
, then use this other value".
You can learn more about this in:
Tags: