This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes clone - Shallow and Deep Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "clone - Shallow and Deep" Watch "clone - Shallow and Deep" New topic

clone - Shallow and Deep

Niyas Ahmed Sheikh
Ranch Hand

Joined: Jun 15, 2005
Posts: 129

What is clone() used for? What is shallow and deep copying. I searched this topic and found one example, but it is more complex and advanced one. So I can't understand it. Please if anyone explain clone,shallow and deep copy with a simple example will be helpful.

Thanks and Regards
Sunil Kumar Gupta
Ranch Hand

Joined: Aug 26, 2005
Posts: 824
Check this............

Lack of will power has caused more failure than lack of intelligence or ability.
My Blog | Red5 Resources | Technology Update | Daily Technology Tips
Sunil Kumar Gupta
Ranch Hand

Joined: Aug 26, 2005
Posts: 824
For clone ..........
I agree. Here's the link:
subject: clone - Shallow and Deep
It's not a secret anymore!