In java there is no pass by reference. Its having only "pass by value".
In "primitive data type" only the value is getting passed. In object only the object reference getting passed as value.
In "primitive data type" only the value is getting passed. In object only the object reference getting passed as value.
Refer : http://javadude.com/articles/passbyvalue.htm for detailed example compare with C++ and C.
No comments :
Post a Comment