In java parameters are passed by value only. This means that parameters are passed as copies of original parameters. If the passed parameters are primitive datatypes (you can watch video 25 - • Java 25: Datatypes (primitive and non-prim... - to learn more about primitive and non primitive datatype), then any changes made to the parameters inside the method will be local to the function, meaning, will be lost upon returning from the function call. However, if we pass, non-primitive data types then since the parameter passed is a reference to an object in memory, then when another copy of this reference is made, it will still point to the same object, therefore, the changes will be made to the original object (except for immutable objects).
On this page of the site you can watch the video online Java 55: Pass by value vs pass by reference with a duration of hours minute second in good quality, which was uploaded by the user Selected Topics in IT 04 July 2021, share the link with friends and acquaintances, this video has already been watched 182 times on youtube and it was liked by 2 viewers. Enjoy your viewing!