Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Groovy 中交换变量的最佳方法是什么?
是否可以在 Ruby 中做类似的事情?
x,y = y,x
只需使用括号进行多重赋值
(x,y) = [ y, x ]