posted 23 years ago
The solution implementing Cloneable is one way, the other is a constructor with the object itself, for example:
It is a matter of taste (and maybe time), which one you prefer. The "Cloneable"-solution is somewhat more intuitive to write, whereas the "Constructor"-solution is somewhat more intuitive to read. But as said: "A matter of taste."
Ok, sometimes the "Constructor"-solution is sometimes hard to implement, depending of members.
Best regards
Detlev