对多个变量赋不同的值
val Array(a, b, c) = Array(1, 2, 3)
println(a) //1
println(b) //2
println(c) //3
// 或者
val (a,b,c)=(1,2,4)
println(a) //1
println(b) //2
println(c) //4
对多个变量赋相同的值
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("Array(", ", ", ")")) //Array(1, 2, 3)