class TestList2 {
}
fun main() {
var mutableList: MutableList<String> = mutableListOf("turnOn", "turnOff")
mutableList.forEach() {
println("元素:" + it)
}
}
kotlin MutableList的遍历
最新推荐文章于 2025-06-03 19:26:51 发布
class TestList2 {
}
fun main() {
var mutableList: MutableList<String> = mutableListOf("turnOn", "turnOff")
mutableList.forEach() {
println("元素:" + it)
}
}