//方法一 i = i + j; j = i - j; i = i - j; //方法二 i ^= j; j ^= i; i ^= j; //方法三 a = a + b - (b = a) 转载于:https://www.cnblogs.com/yingl/p/5820310.html