My friends, I am a c++, c, python and c# developer from china. All Javabook and all Internet sites, which I saw in my own said, that the precedense in java are like the table under my text. the precedence table says: +expr and -expr is over additive + and - and also over the multiplicative like *,/ and %.
for instance
b*-a
would interpreted as (b)*(-a)
and that is true okay and correct with the table.
But, when I follow the table
a+b
should not work because, the precedence table, which is in all books which i saw like in the internetsite, says Java should interpreted it so:
a(+b)
so we should get a error and not an addition, but java makes an addition between a and b, but normally that should not be a addition, when I follow the precedence table.
When i make a++b then java intepret at like the precedence table to a+(+b), but normally, when I follow the precedence table a addition like a+b should not work, because the precedence table says that is not a addition!