特牛网址导航

scala 同时赋值多个变量_scala中一次性将array 参数赋值给变量-CSDN博客

网友收藏
文章浏览阅读1k次。val Array(a, b, c) = Array(1, 2, 3) println(a) //1 println(b) //2 println(c) //3 val a,b,c = Array(1,2,3) println(a.mkString("Array(", ", ", ")"))//Array(1, 2, 3) println(b.mkString("Array(", ", ", ")")) //Array(1, 2, 3) println(c.mkString.._scala中一次性将array 参数赋值给变量