This is shallow clone: copy of the collection structure, not cloning the elements.
List
val items = listOf(1, 2, 3)val newList = items.toList()
or
val newList = items.toMutableList()
or
val newList = ArrayList(items)
Map
val items = mapOf(1 to "Desmond", 2 to "Mei Ru", 3 to "Jack")val newMap = items.toMap()
or
val newMap = items.toMutableMap()
or
val newMap = LinkedHashMap(items)