`List.of(...)` creates an unmodifiable (immutable) list. If you try to add/remove elements, you get `UnsupportedOperationException`. A common gotcha: it also does not allow null elements (it throws `NullPointerException` on creation).
List<String> xs = List.of("a", "b");
// xs.add("c"); // throws UnsupportedOperationExceptionExpanding on the short answer — what usually matters in practice:
Here’s an additional example (building on the short answer):
List<String> xs = List.of("a", "b");
// xs.add("c"); // throws UnsupportedOperationException