The example of this article tells the method of Java using serialization to implement the object depth of clone. Share it for everyone for your reference. The specific implementation method is as follows:
Bytearrayoutstream byteout = new bytearrayoutStream (); ObjectoutStream Out = New ObjectPutstream (byteout); Out.writeObject (Obj) ; BytearrayInputStream bytein = New BytearrayInputStream (byteout.tobytearray ()); = in . READOBject ();
It is hoped that this article is helpful to everyone's Java program design.