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

Pubblicato il: 07 marzo 2019
sul canale di: 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


In questa pagina del sito puoi guardare il video online 6E. Java Basics for Selenium - Methods - Interview Questions della durata di ore minuti seconda in buona qualità , che l'utente ha caricato subbus tech 07 marzo 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 23 volte e gli è piaciuto 1 spettatori. Buona visione!