hello,
i dont get why the output is x=8 , y=2 and NOT x=4 , y=1.
A step by step solution would be appreciated
***************************************************************************
public class Foozit {
public static void main(
String[] args) {
Integer x=0;
Integer y=0;
for(Short z=0;z<5;z++)
if((++x >2)||(++y > 2))
x++;//in the second iteration x starts at 1 and not 2?!
System.out.print(x + " " +y);
}
}
***************************************************************************