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

LM Studio is a desktop application designed for developing and experimenting with large language models (LLMs) directly on your computer.

    LM Studio Overview LM Studio is a desktop application designed for developing and experimenting with large language models (LLMs...