3 ms·
`List<T>` is technically immutable. You can make it mutable by casting to `MutableList<T>`, but that's something you have to explicitly do.
by relics443 9y ago
`List<T>` is technically immutable. You can make it mutable by casting to `MutableList<T>`, but that's something you have to explicitly do.
- lmm 9y agoIt's not immutable, it's something analogous to C const: you can't mutate it, but it can be mutated under you. If you call .size() on it twice you might get different results.