> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/general/immutable-and-unmodifiable.md).

# Immutable and Unmodifiable

## Immutable

JDK utilities classes can be used to generate immutable empty collections:

```java
Collections.emptyList();
Collections.emptyMap();
```

Immutable empty collections will reject values.

## Unmodifiable

These same classes can be used to wrap standard containers and make them unmodifiable:

```java
Iterables.unmodifiableIterable(samples);
Collections.unmodifiableMap(params);
```

While it isn't possible modifying this wrapper the original collection may still change.
