Aman Garg
Oct 16, 2022

--

Using a marker interface like Cloneable is always a better step than dealing with output streams and having a very strict dependency on "Serializable" which has persistence semantics and needs a serial version identifier.

public class OrderDetails implements Cloneable {

@Override

public Object clone() {} {

....

}

--

--

Aman Garg
Aman Garg

Written by Aman Garg

Senior Software Engineer @Uber

No responses yet