WebHosting

Thursday, June 7, 2012

Deep Copy and Shallow Copy in OOPS

Shallow Copy :
This does a bit-wise copy of an object. So when is new object is created it will have exact copy of the object, this is where problem comes, suppose the object which is to be cloned has some variable as reference or a reference variable pointing to some other data or object, then in the new object clone will contain the reference to the old object data only,


***Soon i will add image to clarify this concept ***


Deep Copy: 
It will be like duplicate of the object, in this copy the new object or variable of referenced data will be created.


***Soon i will add image to clarify this concept ***

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

How to Auto-Terminate Frozen and Hung Apps in Windows

We have all been there. You are in the middle of an important project or a gaming session, and suddenly, your screen freezes. The dreaded ...