0

If i println x++ and i println x; it gives the same value but x++ is increment of x and x is just x

https://code.sololearn.com/cYebz2SxL8ey/?ref=app

27th Oct 2019, 10:23 PM
Tenibiaje Miracle Paul
Tenibiaje Miracle Paul - avatar
2 ответов
+ 3
The x++ doesn't change the value immediatly, so if you print it, it will output the same value of x. But if you try to println x again, you'll see that the value has increased by 1. If you still don't understand, please go back to the course and see the examples there, and play with them a bit, they are well explained.
27th Oct 2019, 11:49 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
Thanks
14th Nov 2019, 2:41 PM
Tenibiaje Miracle Paul
Tenibiaje Miracle Paul - avatar