It's right associative so:
String s1 = (b=!b)?(b=!b)?"Hello":"hello"
b=!b)?"world":"World";
is broken down to:
String s1 = (b=!b)?
<(b=!b)?"Hello":"hello"
>:
<(b=!b)?"world":"World";
> condition
b=!b)
expr1: (b=!b)?"Hello":"hello"
expr2: (b=!b)?"world":"World"
And the execution steps are as follows:
1.Main condition: (b=!b) ~ false -> proceed to expr2
2.expr2 condition: (b=!b) ~ true -> return "world"
Hope this helps.
[ June 21, 2003: Message edited by: Alton Hernandez ]