10.3. Pass by Value vs Pass by Reference
Pass by Reference means the passing the address of the argument in the method call. So if the called method changes the state of the argument object then it is reflected in the calling program.
Pass by value means passing a copy of the value as an argument. So the called method is only operating on the copy of the original argument and changes made in the method are not reflected in the calling program.
What happens in Java World?
Java is strictly pass-by-value and does NOT support pass-by-reference. You’ll see how Java handles the primitive type and object arguments in the next sections.