Wednesday 24 April 2013

Difference between 'pass by value' and 'pass by reference'

Pass by Value - This means passing the actual value of the variable as an argument to some method.

Pass by Reference - This means passing the reference to the variable as an argument to some method.

Now the question ??? What does Java Use from among the two ??? 

Java is actually pass by value for all the variables within a single VM.

No comments:

Post a Comment