Tuesday, November 29, 2011

When we are sending the serialized array object thro the network, what is being passed ? is the value or the reference ?

Java has only pass by value associated with it. Even when an Object is passed the value of Object reference in the Stack is passed(not the actual Object in Heap) But since the value passed in is a reference to an Object any modification to the data in this Object will modify the data in original Object. But any assignment operation done to the passed value will not affect the orignal object.
Category:Java Interview Questions

No comments:

Post a Comment