Anybody know the difference between clone in java and copy constructor in C++?
wwlhp@jdon.com
2003-06-03 17:26
To Bruce: Clone and copy constructor are all used to create a new object according to a given prototype,except that the new object is exactly the same as prototype in clone, but may not in copy constructor( as you like )
bruce
2003-06-04 09:33
wwlhp@jdon.com
Thank you very much. I got it. Java Clone and C++ copy constructor are all deep clone() if we don't take the object-in-object situation into consideration. Right?