As you understand, the only way to swap to primitives by a method works only if they are in global scope or class scope.
As for arrays and objects, they are passed by reference in Java. So any changes that you make changes the actual argument to the method. On the other hand if you are looking for a neat way to swap two objects, just implement a swap method as a method in the class and call it like:
anObject.swap(anotherObject);
This way you can implement the swap however you want.