android面试的时候面试官问的一道题

a=1,b=2,不借助第三方变量,a,b互换?

步骤:

a=a+b
b=a-b
a=a-b

哈哈,很鸡肋的题

猜你喜欢

转载自blog.csdn.net/Hunter2916/article/details/82587569
今日推荐