Okay I have got following for loop:
public static void main(String []args){
for (int i=2; i<12 ; i=i+2)
System.out.print(3-i%3);
System.out.println();
}
And it is printing out: 12312. In order to understand how it calculates the numbers I have tried to work it out and according to my working it out the first number should be actually 2.
I am pretty sure, I am wrong with my thinking since BlueJ prints out firstly number 1. But why 1? Can someone explain it?
I have written on a piece of paper the way how I understood/work out the calculation and took a picture of it so you can see my working of getting the number 2 and maybe you can point out my mistake.