How is deep copy and shallow copy executed in clone[create+copy] method together?

Hi there,

I was learning about difference between copy and clone method in uvm.
In which I found some info about it which confuses me,
Difference 1 :
Clone() : It gives the shallow copy of the object
Copy() : It gives the deep copy of the object
Difference 2 :
Copy is only copy method
clone = create + copy method

So my question is that if copy included in clone method than how deep and shallow copy execute together ???
Also guide me if I am wrong somewhere…

Thanks,
Himanshu

In reply to himanshuchauhan:

clone first create a new object and then make a deep copy of that

check this post…
https://verificationacademy.com/forums/ovm/importance-clone-method

In reply to nilendra:

An object copy is a process where a data object has its attributes copied to another object of the same data type. In .Net Shallow copy and deep copy are used for copying data between objects. Moer about…Shallow copy and deep copy

Biden