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).
En esta página del sitio puede ver el video en línea Java 55: Pass by value vs pass by reference de Duración hora minuto segunda en buena calidad , que subió el usuario Selected Topics in IT 04 julio 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 182 veces y le gustó 2 a los espectadores. Disfruta viendo!