Pass by value
Java always passes by value. For primitives, the value is copied. For objects, the reference is copied, the method can mutate the object but not rebind the caller's variable:
static void bump(int x) {
x += 10; // only the local copy changes
}
int n = 5;
bump(n);
// n is still 5
To change a caller's value, return it or wrap it in a mutable object.