Is it possible to write swap method in Java?

Viewed 49949

Here is the question: write a method that swaps two variables. These two variables should be primitives. It doesn't need to be generic e.g. two int variables. Is there a way?!

13 Answers
Related