that's actually not a stupid question, believe it or not. Many programmers don't know what that does.
It's commonly called the ternary operator, or at least it is in common usage. There is probably a more official name for it, but as it's the only operator that takes 3 operands ternary operator is pretty unambiguous.
Anyhow, it's a shorthand if statement:
Evaluates to whatever true is if expr is true or whatever false is if expr is false. If you wrote it out the long way:
if(expr) {
variable =true;
} else {
variable = false
}
I don't use it often, but that's probably because most of my expressions are already pretty long (o the joys of mathematical coding) and it's worth just breaking them up. Also it lets me put in comments.
Perhaps the most common use is this line, which is usually abstracted behind a function:
var = var < 0 ? -var : var;
Also known as absolute value.
My BlogTwitter: @ajhicks1992