+ 1
What is the different between i++ and ++i in java??
3 ответов
+ 4
Lots of great explanations here, since I'm lazy:
https://www.sololearn.com/Discuss/336732/what-is-the-difference-between-x-and-x
https://www.sololearn.com/Discuss/305422/x-and-x
https://www.sololearn.com/Discuss/208414/what-s-the-diffrence-between-x-and-x
https://www.sololearn.com/Discuss/178012/fr-x-et-x
https://www.sololearn.com/Discuss/160327/what-is-the-difference-between-x-x-x-and-x
https://www.sololearn.com/Discuss/56740/what-is-the-difference-between-x-and-x
https://www.sololearn.com/Discuss/252564/can-someone-explain-what-the-difference-in-usage-would-be-between-x-and-x
https://www.sololearn.com/Discuss/217288/what-is-the-difference-between-i-i
https://www.sololearn.com/Discuss/68325/a-123-a-you-can-explain-a-please
Yea.. people ask this alot.
+ 4
https://www.sololearn.com/Play/Java/
you can learn in the lesson
0
the time when it's incremented (and in some cases of iterators the execution speed).
prefix - apply first incrememt, then use
postfix - first use, then increment
int i = 0;
cout << ++i << endl; // 1
cout << i++ << endl; // 1
// now i == 2