fix2009
asked on
Cloneable versus Serializable
Could someone suggest that how much the performance will be impacted if Serializable interface is used to clone java objects. org.apache.commons.lang.Se rializatio nUtils provides a method clone() to clone any serializable object but it says its slower. Any other alternative of cloning? Not sure if there is any benchmark tool available for this?
ASKER
So is there any other alternative of cloning an object other than clone() method? I am actually looking for if I dont have to maintain clone method when new properties are added to the object.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to walk through the object graph to store the state of the object. While
in cloning, the user can simply call other construtor to create a new
instance.