This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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 ..........
jQuery in Action, 2nd edition
subject: clone - Shallow and Deep
Similar Threads
shallow copy and deep copy?
Arrays.sort resulting in infinite loop
shallow copy vs deep copy?
need your help about a cast about cloneable.!!!(jcjp07-Q119)
clone() used on array and object