Hi, just curious why `listOf` returns `java.util.A...
# getting-started
e
Hi, just curious why
listOf
returns
java.util.Arrays$ArrayList
(as a mutable collection). And at the same time, the returning list prohibits modification operations
y
That isn't the
ArrayList
you expect. It's a different one called
Arrays.ArrayList
that implements the
List
interface for Java Arrays, and hence it has a fixed length and doesn't permit
add
e
Ah, I overlooked. Thanks