Next comes the boring basic theory. . .
1. Fixed-length array
//初始化为0
val nums = new Array[Int](10)
//null
val a = new Array[String](10)
//推断类型,有值不需要new
val s = Array("hello","world")
//使用()而不是[]访问数组
s(0)
Next comes the boring basic theory. . .
//初始化为0
val nums = new Array[Int](10)
//null
val a = new Array[String](10)
//推断类型,有值不需要new
val s = Array("hello","world")
//使用()而不是[]访问数组
s(0)