Skip to content

Glossary: Data Structures and Algorithms in Java

List.of

Also written: unmodifiable list, fixed list

Makes a list that cannot be changed. Sorting or adding to it throws `UnsupportedOperationException`, so copy it into a new `ArrayList` first.

Where the book teaches it

Related terms

ArrayListimmutable