Question 7
Back to Exercise
After a shallow clone of an object with a List field, what is true?
- A The list is copied
- B Both objects refer to the same list Correct
- C The list is null in the clone
- D The list becomes immutable
Correct Answer: Option B
Only references are copied; copy the list yourself for a deep copy.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!