+1 vote
in JAVA by

What’s the difference between deep copy and shallow copy?

1 Answer

0 votes
by

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.

Related questions

+2 votes
0 votes
asked Dec 12, 2022 in Deep Learning by Robin
+1 vote
asked Jun 10, 2021 in Deep Learning by Robindeniel
...