Does Java pass function arguments by reference or value?
This is a confusing question. There are tons of people arguing this on the web. Here is my comment:
- Java passes function arguments by value
- Java handles object with object reference
If you want to know more, read this very good article explaining the problem clearly with codes and graphical examples.