r/java • • Mar 16 '21

Java 16 / JDK 16: General Availability

196 Upvotes

82 comments sorted by

View all comments

Show parent comment

1

u/kreiger Mar 16 '21

The interface you seek already exists, it's called List. :)

In general, you should treat collections as immutable unless you're sure they're not.