call by refernce

September 28, 2010 at 04:39:25
Specs: Windows 7, i3/3 gb
call by reference in JAVA .please expalin everything that what happens when CALL BY REFERNCE IN JAVA take place.. :)

See More: call by refernce

Report •

October 1, 2010 at 00:39:06
Call by reference is what it actually means in english.

suppose you have a variable X = 14 in a function called Function1.
you want to send the value of X to another fuction called Function2.

Call by value means, you make a copy of variable X and send it to Function2. whatever Function2 does to the copy it doenst change the original X in Function1. X will remain 14.

Call by reference means, you send memory address of the original X to Function2, and whatever changed Function2 makes to it, it will change the original variable X.

Report •
Related Solutions

Ask Question