This is called a ternary or conditional statement (depending on who you ask)
This allows you to make single-line conditional expressions, for example, in this pseudocode
print a==1 ? 'a is one' : 'a is not one'
As John Skeet notes, his own name is a conditional operator, but it has 3 operands, so this is a triple operator.
source share