Stenway Developer Network

Increment / Decrement

Increment and decrement statements:

i++
i--

Can only be used as statement, not as expression. Therefor only a postfix operator exists and no prefix operator.

Is identical to:

i += 1
i = i + 1

Or:

i -= 1
i = i - 1