listOf() is by default immutable. mutableListOf() ...
# getting-started
j
listOf() is by default immutable. mutableListOf() is mutable.
a
But i cannot pass existing collection to the
listOf
, it only accepts varargs
d
You can use
toList()
on an existing collection.
a
Oh! Thanks!