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).
Nesta página do site você pode assistir ao vídeo on-line Java 55: Pass by value vs pass by reference duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Selected Topics in IT 04 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 182 vezes e gostou 2 espectadores. Boa visualização!