Java syntax of +
- by Pindatjuh
Why is the following syntax correct:
x = y+++y;
(Where it means y++ + y or y + ++y which both mean y * 2 + 1)
But this is not valid syntax:
x = y+++++y;
(Which should mean y++ + ++y, which must mean y and increase y and then add ++y which increases y thus y * 2 + 2)
Is there a reason for this?