THOUSANDS OF FREE BLOGGER TEMPLATES

Monday, April 19, 2010

Pass-by-value
The actual parameter (or argument expression)
is fully evaluated and the resulting value is copied
into a location being used to hold the formal parameter's
value during method/function execution. That location is
typically a chunk of memory on the runtime stack for the
application (which is how Java handles it), but other
languages could choose parameter storage differently.
Pass-by-reference
The formal parameter merely acts as an alias for
the actual parameter. Anytime the method/function
uses the formal parameter (for reading or writing),
it is actually using the actual parameter.

0 comments: