Is Java "pass-by-reference" or "pass-by-value"?
Asked 07 September, 2021
Viewed 2.2K times
  • 52
Votes

I always thought Java uses pass-by-reference.

However, I've seen a blog post that claims that Java uses pass-by-value.

I don't think I understand the distinction they're making.

What is the explanation?

30 Answer