Search code examples
javapostfix-operatorprefix-operator

Prefix vs. Postfix increment when no other operation is involved?


++i;

vs.

i++;

Does the use of prefix increment or the use of postfix increment make a difference in the given two statements (the point being that no other operation is involved there, except incrementing the variable)?


Solution

  • No. It just increment the value of i by one and that's it.