+ 1
What is deference between postincrement and preincrement
3 ответов
+ 4
There are lots of answers on this in the Q & A, at least do little search before posting. Happy coding!
+ 2
preincrement evaluates before the expression while postincrement evaluates only after the expression. for example, given a=1, system.out.println(++a) outputs 2 (first increment, then print the value), while system.out.println(a++) outputs 1 (first display, then increment the value of a)