DEV Community

Abhinav Dogra
Abhinav Dogra

Posted on

Is Java “pass-by-reference” or “pass-by-value”?

I always thought Java uses pass-by-reference. However, I read a blog post which claims that Java uses pass-by-value. I don't think I understand the distinction the author is making.

What is the explanation?

Top comments (0)