Hacker News new | past | comments | ask | show | jobs | submit login

.





The field is final, not it’s contents. It’s not a ”final list” on that field, it’s a (mutable) list that is the final assignment of a field.

Mutability or immutability is part of the type not the field so you have 4 combinations in total

List<T> list;

final List<T> list;

final ImmutableList<T> list;

ImmutableList<T> list;

And that’s not even considering whether each T in the list is mutable or not.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: