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?!
Without using an array or objects, no, it is not possible to do it within a method.