Precedence of ++ and — operators in Java
问题 I read from the official tutorial of Java that prefix and postfix ++ -- have different precedences: postfix: expr++ expr-- unary: ++expr --expr +expr -expr ~ ! Operators According to the tutorial, shouldn't this d = 1; System.out.println(d++ + ++d); print out 6 ( d++ makes d 2, ++d makes it 3) instead of 4? I know the explanation of ++d being evaluated beforehand, but if d++ has higher precedence then ++d , why isn't d++ being first evaluated? And what is more, in what case should d++ shows