Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?
++i
i++
for
i++ ; ++i ; both are similar as they are not used in an expression.
class A { public static void main (String []args) { int j = 0 ; int k = 0 ; ++j; k++; System.out.println(k+" "+j); }} prints out : 1 1