Why does this
int x = 2;
for (int y =2; y>0;y--){
System.out.println(x + \" \"+ y + \" \");
x++;
}
prints the s
From the Java Language Specification chapter on for loops:
BasicForStatement:
for ( ForInit ; Expression ; ForUpdate ) Statement... if the ForUpdate part is present, the expressions are evaluated in sequence from left to right; their values, if any, are discarded. ... If the ForUpdate part is not present, no action is taken.
(highlight is mine).