1
JavaBeginner#collections
Use Collections.unmodifiableList/Set/Map to wrap an existing collection (still reflects changes to the underlying one), or use List.of/Set.of/Map.of (Java 9+) to create truly immutable collections directly.
List<Integer> immutable = List.of(1, 2, 3); immutable.add(4); // throws UnsupportedOperationException