Which is the best way to swap to variable in Groovy?
Is it possibile to do something like in Ruby?
x,y = y,x
Just use parentheses for multiple assignment
(x,y) = [ y, x ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With