Pre and post increment in java [duplicate]
问题 This question already has answers here : How do the post increment (i++) and pre increment (++i) operators work in Java? (14 answers) Closed 2 years ago . I know how pre and post increment operators work, but recently I found out a strange behavior in Java. What i knew so far was (as explained in this answer as well): a = 5; i=++a + ++a + a++; => i=6 + 7 + 7; (a=8) which clearly shows that the ++a returns the value after increment, a++ returns the value before increment. But very recently, I