Question 10
Back to Exercise
What is the difference between Collections.unmodifiableList(list) and List.copyOf(list)?
- A No difference
- B The view reflects later changes to the original list; copyOf is an independent snapshot. Both reject modification. Correct
- C copyOf allows modification
- D The view is a deep copy
Correct Answer: Option B
Choose based on whether callers should see later updates.
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!