ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2016/09/25
Awwab Ahmed
من قبل 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
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة