What is the difference between pass by reference and pass by value?

Showing Answers 1 - 1 of 1 Answers

samiksc

  • Jan 20th, 2006
 

Pass by reference passes a reference to the original copy of a parameter. So changes made by the called method to its parameters are reflected in the variables of the calling method.

Pass by value passes a copy of variables -- so changes made by the called method to its parameters are not reflected back to the variables of calling method.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions