Answer:
It's a compact way of doing an if-else statement.
General Format is
<condition> ? <if condition is true> : <else>;
Example:
I could rewrite:
if(a==1) temp = 1;
else temp = 999;
as
temp = (a==1) ? 1 : 999;
9.5m questions
12.2m answers