What’s the difference between deep copy and shallow copy?
1) Shallow copy in java copies all values and attributes of an object to another object and both objects reference the same memory locations.
2) Deep copy is the creation of an object with the same values and attributes of the object being copied but both objects reference different memory locations.