Objects in Java are passed by value of reference. So if you pass in an object, it gets a copy of the reference (if you assign that reference to something else, only the parameter is modified, the original object still exists and is referenced by the main program).
This link demonstrates a bit about passing by value of reference.
public void badSwap(Integer var1, Integer var2)
{
Integer temp = var1;
var1 = var2;
var2 = temp;
}
Those are references to objects, but they will not be swapped since they are only the internal references in the function scope. However, if you do this:
var1.doubleValue();
It will use the reference to the original object.