There seems to be some kind of confusion here. Java always evaluates from left to right (or to be more precise, always pretends to do so), as stated in the JLS here:
The Java programming language guarantees that the operands of
operators appear to be evaluated in a specific evaluation order,
namely, from left to right.
What you're talking about is the direction of associativity, that is if an operand is sandwiched between two operations of the same precedence, which one is the operand bound to. So the ternary operator for example is right-associated because if you've got a?b?c:d:e
, you expect it to resolve to a?(b?c:d):e
But the postfix ++
, on the same precedence level as the '.' operator is left-to-right associated, which is why foo.bar++
works.
The prefix ++
is indeed right grouping because ++++x
should really be `++(++x). Since it's a unary operator and the operand is to the right, it must group to the right.