Asked by yukihira souma on Sep 27, 2024
Verified
A _____________ copy of an object is a copy that has references in common with the original object.
A) bit copy
B) deep copy
C) shallow copy
D) none of the above
Shallow Copy
A shallow copy of an object copies the 'outer' structure of the object, but not the inner objects; the copied object still references the same inner objects as the original.
- Comprehend the concept of shallow and deep copying in object-oriented programming.
Verified Answer
CC
Cindy Cardoso1 day ago
Final Answer :
C
Explanation :
A shallow copy is a copy that shares references with the original object, meaning changes made to one will affect the other. A bit copy creates a completely new and identical copy, while a deep copy creates a new copy with all references also copied recursively. None of the above implies that there is no suitable choice, but in this case, there is a correct choice.
Learning Objectives
- Comprehend the concept of shallow and deep copying in object-oriented programming.