The question mark is the conditional operator. It is a ternary operator, it has three parts: the condion, the result if true, and the result if false.
The syntax is (Boolean expression)? true value: false value;
The conditional operator is used instead of if/else in very simple situations.