Prev Next

Java / Operators

What is the difference between ++i and i++ under increment operators?

In ++i, the value of i will get incremented before it is used in the expression.

In i++, the previous value is used in the expression first, and after that i is modified and incremented.

More Related questions...

Show more question and Answers...


Comments & Discussions