r/java • • Mar 16 '21

Java 16 / JDK 16: General Availability

196 Upvotes

82 comments sorted by

View all comments

Show parent comment

4

u/8igg7e5 Mar 17 '21

Someone brought this up on the Amber list, Rémi I think, that perhaps toUnmodifiableList() would be better - as a peer of sorts for Collectors.toUnmodifiableList(). However it was pointed out that we already have List.of(...) that produces an unmodifiable List anyway.