package operator;
//不用第三个辅助变量,实现两个数的交换
public class Demo08 {
public static void change(int a, int b){
a = a+b;
b = a-b;
a = a-b;
System.out.println(a);
System.out.println(b);
}
public static void main(String[] args) {
change(900,3000);
}
}
后续可能会补充别的算法。