版权声明:本文为博主原创文章,转载请附上博文链接! https://blog.csdn.net/qq_42920045/article/details/84656534
public static void main(String[] args) {
int i = 1;
int j = 2;
i = i + j;// i = 3 : j = 2
j = i - j;// j = 1 : i = 3
i = i - j;// i = 2 : j = 1
System.out.println("i:" + i + ", j:" + j);
}
执行结果
i:2 , j:1