A shallow copy will get the information from the selected field values but it may lead to a result that you do not want as the memory it points to will not be included. A deep copy, on the other hand, will be able to point to the memory that you would like to get. In other words, a shallow copy is only a clone but a deep copy will be able to produce results.
It will depend on you and the actions that you are doing to choose which type of copy you would use. They are both useful for various purposes. Take note that a deep copy and a shallow copy is different from object copy which simply means copying the object perse.
Shallow copyis a bit-wisecopyof an object. A new object is created that has an exactcopyof the values in the original object. If any of the fields of the object are references to other objects, only the reference addresses arecopiedi.e., only the memory address iscopied.