package day01; public class Test1 { public static void main(String[] args) { //不利用其它变量时期A和B的值交换 Integer A=1; Integer B=2; // fun1(A, B); //异或 fun3(A, B); } public static void fun1(Integer a,Integer b){ a=a+b; b=a-b; a=a-b; System.out.println("A="+a+",B="+b); } //异或实现两个数据交换 public static void fun3(Integer A,Integer B){ A=A^B; B=A^B;//A^B^B=A A=A^B;//A^B^A=B Syst