Java8 | 69 | Collectors | Unmodifiable List | Unmodifiable Set | Tamil

Опубликовано: 27 Март 2026
на канале: Learn Automation Online
2,235
20

The unmodifiableList() method of java.util.Collections class is used to return an unmodifiable view of the specified list. This method allows modules to provide users with “read-only” access to internal lists. Query operations on the returned list “read through” to the specified list, and attempts to modify the returned list, whether direct or via its iterator, result in an UnsupportedOperationException.

The returned list will be serializable if the specified list is serializable. Similarly, the returned list will implement RandomAccess if the specified list does.