If you check the
Java Language Specification, you'll find the following under "Compound Assignment Operators".
First, the left-hand operand is evaluated to produce a variable...
...the value of the left-hand operand is saved and then the right-hand operand is evaluated...
...the saved value of the left-hand variable and the value of the right-hand operand are used to perform the binary operation indicated by the compound assignment operator
In other words, it uses the value of
s at the start of processing (5) to add to the result of the right-hand operation (10) to produce the final result to assign (15). The incremented value is therefore not used in the calculation, and is overwritten by the final assignment.