?: is an operator that works similar to an if construct except it can return a value when used on an expression. The syntax is [condition] ? [statement1] : [statement2]; where statement1 is executed if condition evaluates to true, statement2 otherwise.
Literally, that should evaluate to returning 'O' like char var = 'X' ? 'O' : 'X';