Simon Lin
09/24/2021, 4:23 AMlist: ["a", "b", "c", "d", "e", "f", "g"]
give specify position: 3
result: ["a", "b", "c"]
ephemient
09/24/2021, 5:06 AMlist.take(3)
, list.slice(0..2)
return a new list with a subset of elements
list.subList(0, 3)
returns a view of the original list
mutableList.subList(3, mutableList.size).clear()
removes the tail from a mutable listSimon Lin
09/24/2021, 5:09 AMval data: MutableList<String>
How to modify val data
list?Simon Lin
09/24/2021, 5:10 AMsubList
. thx