Ii++计算

public class TestClass1 {

static {
int x=5;
}
int z;
static int x,y;
public static void main(String[] args){
x--;
myMethod();
System.out.println(x + y++ + x);
}
private static void myMethod(){
y=x++ + ++x;
System.out.println("y="+y+" x="+x);
}
}

answer=2

原文地址:https://www.cnblogs.com/csxf/p/3489223.html