From what I have read it seems postfix increment and decrement operators have higher precedence over prefixed ones, but in an expression where both are being used the prefix gets evaluated first. I am reading from SCJP A comprehensive Khalid. Any recommendation on resources for clearly understanding operators and assignment in java would be helpful.
views:
37answers:
2
A:
Because that's how prefix operators work. They are defined by the language to occure before postfix operators. The precidence has nothing to do with it.
Burton Samograd
2010-09-23 15:55:37
Doesn't your third sentence directly contradict your second sentence?
Tony Ennis
2010-09-23 16:09:07
A:
Not correct. They have the same precedence. See the Java grammar. However of course pre-increment is evaluated before post-increment. That's what the words mean.
EJP
2010-09-24 12:09:08