Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

call by value and call by reference in java

Call By Value: In this parameter passing method, values of actual parameters 
are copied to function’s formal parameters and the two types
of parameters are stored in different memory locations. 
So any changes made inside functions are not reflected in actual 
parameters of the caller.
  
Call by Reference: Both the actual and formal parameters refer to the
same locations, so any changes made inside the function are actually 
reflected in actual parameters of the caller.  
  
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #call #call #reference #java
ADD COMMENT
Topic
Name
4+3 =