fun main() {
val list = listOf("Jason", "Jack", "Jacky")
val mutableListOf = mutableListOf("Jason", "Jack", "Jacky")
mutableListOf.add("狗蛋")
println(mutableListOf)
//相当于add
mutableListOf += "张三"
println(mutableListOf)
// 相当于remove
mutableListOf -= "狗蛋"
println(mutableListOf)
//根据条件一出
mutableListOf.removeIf{ it.contains("J")}
println(mutableListOf)
}
非常的时尚