Consider the code below:
DummyBean dum = new DummyBean(); dum.setDummy(\"foo\"); System.out.println(dum.getDummy()); // prints \'foo\' DummyBean dumtwo = du
In the package import org.apache.commons.lang.SerializationUtils; there is a method:
import org.apache.commons.lang.SerializationUtils;
SerializationUtils.clone(Object);
Example:
this.myObjectCloned = SerializationUtils.clone(this.object);