位移运算骚操作

1.不适用中间值交换两参数

public void swap(int a, int b) {
        a ^= b;
        b ^= a;
        a ^= b;
}
原文链接:,转发请注明来源!

发表回复