Why does this
int x = 2; for (int y =2; y>0;y--){ System.out.println(x + \" \"+ y + \" \"); x++; }
prints the s
Because nothing in your examples is using the value returned from the pre- or post-increments. Try wrapping a System.out.println() around the ++x and x++ to see the difference.
System.out.println()
++x
x++