Or to paraphrase to a slightly more readable version:
No difference, just relies on the fact that things are easier to understand if you don't have to get your head around a negation first... Dave
posted 15 years ago
booleanTest ? expression1 : expression2 This is the only ternary operator in Java. As already expressed, it's a shorthand if-else construct. If the boolean test is true, then the first expression is evaluated and returned; otherwise the second expression is evaluated and returned.