java自增赋值题

int i = 1;// i =1
i = i++;// i = 1
int j = i++;//j= 1;i=2
int k = i + ++i * i++;//k =2 + 3 * 3;i=4;
System.out.println("i = " + i);
System.out.println("j = " + j);
System.out.println("k = " + k);

结果

i = 4
j = 1
k = 11

你可能感兴趣的:(java自增赋值题)