Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Deleted user
Date Posted: 2016/09/25
Awwab Ahmed
by 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
by 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
by 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