I'd say there are two answers
1) Never
2) when you want to create unreadable code
As I understand it, the ternary operator boolean?condition1:elseCondition was included in
Java becuase it existed in C
Since you can easily live without it and ppl who have to read your code afterwards would otherwise hate you, I've learnt to live without it.
You can write horrible things like this tho...
but I don't think anyone will mind if you don't
Dave
(i think the code is more or less correct, I'm certainly not putting too much effort into it)