defensive copy
A copy of a mutable object made on the way in or out of a class, so outside code can't change its internals.
A defensive copy (e.g. array.clone() or Arrays.copyOf) is stored by a constructor or returned by a getter instead of the original reference, preventing aliasing of mutable internal state.
Examples
this.items = List.copyOf(items);in a constructor.
See also