hi,all
i think this problem is mainly concerned with Evaluation Order,The order, from high precedence to low precedence, is as follows:
1.++ postfix, --postfix
2.++ prefix, -- prefix, + unary, - unary, ~, !
3.(type) casting
4.*, /, %
5.=, + (binary), - (binary)
6.<<, >>, >>>
7.<, >, <=, >=, instanceof
8.==, !=
9.&
10.^
11.|
12.&&
13.| |
14.?: (ternary operator)
15.=, +=, -=, *=, /=, %=, >>=, <<=, >>>=, &=, ^=, |=
it's clear that '+' has a higher precedence than ':'
,so the output maybe ......
------------------
Tony Sam
One want to be a
SCJP...