31.03.2013, 08:42
what is the diffrence between:
++i
to
i++
++i
to
i++
++i will increment the value of i, and then return the incremented value.
i++ will return the pre-incremented value and then increment the value of i. http://stackoverflow.com/questions/2...etween-i-and-i |
If u will study C language,you will study Pre-Increment and Post-Incremet.
Pre-Increment = First use then change and Post-Increment = First use then change. In ur question ++i = pre-increment and i++ = post-increment |
If u will study Java language,you will study Pre-Fix and Post-Fix.
Pre-Fix = change and then use. and Post-Fix = use and then change. In ur question ++i = pre-fix and i++ = post-fix |