https://kotlinlang.org logo
#announcements
Title
# announcements
k

kitttn

04/16/2017, 10:58 AM
like
someList[:]
in Python
m

mg6maciej

04/16/2017, 1:17 PM
If you want to be explicit, you may do
ArrayList(myList)
to make a copy.
Useful when sending a list to Java code, which doesn't know the difference between mutable and immutable lists.
5 Views