Kotlin函数的解构声明

fun test11(){
    var result = Result("success",4)
    val (msg,code) = result
    println("Message:$msg")
    println("Code:$code")
}

  

posted on 2021-03-14 22:16  endian11  阅读(51)  评论(0编辑  收藏  举报

导航