Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the difference between pass-by-refence and pass-by-value?

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2016/09/25
Awwab Ahmed
par Awwab Ahmed , Web-Developer, Graphic-Designer. , Conobio

Pass by Value: The method parameter values are copied to another variable and then the copied object is passed, that’s why it’s called pass by value.

Pass by Reference: An alias or reference to the actual parameter is passed to the method, that’s why it’s called pass by reference.

hassane ariouat
par hassane ariouat , it consultant , D-SOFT

the pass by value only uses the contents of the variable, against the passage by reference it is the same variable it. any changes affect the variable

Anitha N
par Anitha N , Classroom Teacher , Little Flower’s Nursery & Primary School

pass-by-reference;  parameter will be the same as the callers passed argument.

pass-by-value;  parameter will be copy of the caller passed argument.

More Questions Like This