When i run the following example i get the output 0,2,1
class ZiggyTest2{
static int f1(int i) {
System.out.print(i + \",\");
If we expand i = i++ + f1(i)
statement, we get something like following
save the value of i in a temp variable, say temp1 // temp1 is 1
increment i by one (i++) // i gets the value 2
execute f1(i), save return value in, say temp2 // temp2 is 0, print 2
assign temp1 + temp2 to i // i becomes 1 again
I guess main steps can be summarized like above.