What is meant by object marshaling and unmarshaling? What is the impact on object state when the above operation happens, i.e. the effect of serialization on hashCode and equals?
What is meant by object marshaling and unmarshaling? What is the impact on object
Share
marshalling means producing a stream of byte which contain enough information to be able to re-build the object.
This has no impact on the original object, it is a read-only operation. Unmarshalling resulting in creating another, unrelated object (typically).
The copy, is likely to have the same
hashCode()and beequals() == trueandcompareTo() == 0(assuming its Comparable).