0

[DUPLICATE] What is differece between pre and post increments

for an example program int x=1; do{system.out.println(x); x++;}while(x<=5); runs loop 5 times if we use ++x how many t times pop executes

31st Jan 2018, 3:26 PM
swathi sri
2 Answers
0
++x increments the value of x and then uses it x++ uses the value of x and increments it later
31st Jan 2018, 3:32 PM
᠌᠌Code X
᠌᠌Code X - avatar