light copy :
If the Members in the array are of the Value Type ( for example, : int, float, double, byte and so on ), the value is completely copied to the target array. , for reference type ( for example, user-defined type : class
Student, class people, or the class type in the class library : arraylist ), copying a reference to the target array.
Sometimes the text is not as goodCodeEasy to understand.However, the Diagram may be easier to understand.,View:
Assume that an array of student classes is created.Student [],Then, copy it to another student array.Student1 []Medium
It is easy to see that the so-called shallow copy applies to the reference type.,Just copy reference.Modifying the memory value through one array affects the reference of another array to memory objects..
The copyto and clone functions in the array class belong to the shortest copy.
deep copy completely creates new objects . Create a new object for all objects in the original array . modifications to the new array do not affect the values or objects in the original array.