6E. Java Basics for Selenium - Methods - Interview Questions

Publicado em: 07 Março 2019
no canal de: subbus tech
23
1

How primitive variables passed to methods - by value or by reference?
In Java, primitive variables are passed to methods by value. If the passed value changes in the method, it does not change the original value.
When we pass an object to a method in java, does it pass by value or reference?
Java creates a copy of references and pass it to method, but they still point to same memory reference. Mean if set some other object to reference passed inside method, the object from calling method as well its reference will remain unaffected.
The changes are not reflected back if we change the object itself to refer some other location or object


Nesta página do site você pode assistir ao vídeo on-line 6E. Java Basics for Selenium - Methods - Interview Questions duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário subbus tech 07 Março 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 23 vezes e gostou 1 espectadores. Boa visualização!