I saw answer some where in discussion forums
It is connection with assigning a value.
System.out.println(" int i = "+ i);
//prints out int i = 0
Because 0 will be assigned first to i
now in 2.again 0 is assigned to i and i is incremented.
Now you run this code
System.out.println("int I = " + i);
//The out put will be int I = 3