pls explain this notation (i think it is an IF STATEMENT
posted 7 years ago
Yes, it's a sort of "if" statement called the "ternary operator". The part before the "?" is the condition, and the parts before and after the ":" are the true and false results, respectively. Both results have to produce a value and they have to be type-compatible. The whole expression says "if value is null, use ""; else use value.toString()."