I guess call by value and call by reference everyone knows.
In Java:
Call By value - premitive types passed in the method call, push their values on stack and hence said as called by Values.
Call By Reference - All objects passed to any method call, pass their reference on stack and hence said as called by reference.
Remiaining is call by address (should be same as call by reference), if not, the person may be addressing following:
Static final member variables (constants) passed in the method call which are in the permanent memory and only the address (or reference) is pushed on stack. As the value on this address can not be changed (only read), the person is refering it as address and not reference.
Hope this helps. Even if you dont answer the person exactly, if you give above answer, interview pannel will understand that your concepts are clear and that's what you need to show.
Thanks,
Jamanat

1 User has rated as useful.
Login to rate this answer.
Java support call by value only

1 User has rated as useful.
Login to rate this answer.
Call by value: A copy of the argument is passed as parameter. So the caller method and the called method are working on different sets of data. Changing one doesn't affect the other
Call by reference:The address of the object on the heap, w.r.t java, is passed as the parameter. So modifying one will have an effect on the other.
Call by address: same as call by reference.
Hope your question is answered, if not already answered.
Login to rate this answer.
Java Does not support call by reference and it only support CALL BY VALUE
Login to rate this answer.
JAVA does not support call by reference. As far as call by value is concerned..it means that java primitives are passed as arguments to a method.
Eg: void swapNumbers (int a, int b) ;
When we talk of passing by reference...we are actually passing "object references" by value.
Eg:
Class Student
{
.................
}
Class containsMain
{
public static void main (String args[])
{
Student rajeev = new Student ("rajeev") ;
Student mohan = new Student("mohan") ;
void swapObjects ( rajeev, mohan) ;
.............................
}
}
In the implementation of swapObjects, we have the folowing...
swapObjects (Student x, Student y)
{
Student temp = new Student (" ");
temp = x;
x = y;
y = temp;
}
Before, This function is invoked, x refers to rajeev and y refers to mohan.
During the function call, the reference of rajeev is copied to x and that of mohan is copied to y.
In the method, the object references are swapped.
However, when the method returns, x and y are abandoned, while the original references of the objects rajeev and mohan are still the same.
If JAVA supported call by reference, the swap would be successful..but it was not.
Summary: JAVA does not support call by reference, but only passing on references of objects by value
Aayush
Login to rate this answer.
In call by value, value is passed and in call by reference, base address is passed.
Login to rate this answer.
call by value--->You are passing primitive value for your method argument.
callby ref--->You are passing object
call by address-->reference and address both are same.
Login to rate this answer.