1.list创建 val list listOf("jave","kotlin","c","c")2.list集合获取的三种方式 开发过程中尽量使用getOrElse()或者getOrNull,因为他可以防止崩溃取值
package Stage4fun main() {//list 创建val list listOf("jav…
1.可变list集合
完整写法
var list:MutableList<String> mutableListOf<String>("java","kotlin","c","c")
省略写法
var list mutableListOf("java","kotlin","c","c")fun ma…