public class test{
  static int x1=4;
  int x2=5;
  public static void main(String args[]){
test obj1=new test();
test obj2=new test();
obj1.x1=obj1.x1+2;
obj1.x2=obj1.x2+4;
obj2.x1=obj2.x1+1;
obj2.x2=obj2.x2+6;
x1=x1+3;
System.out.println("obj1.x1="+obj1.x1);
System.out.println("obj1.x2="+obj1.x2);
System.out.println("obj2.x2="+obj2.x2);
System.out.println("test.x1="+test.x1);
}
}
为什么这4个数会等是
10
9
11
10

是因为x1 是静态的吗