摘要: Map //不可变的Map val scores = Map("Alice" -> 3, "lucy" -> 6, "Lily" -> 9) //可变的 scala.collection.mutable.Map("Alice" -> 3, "lucy" -> 6, "Lily" ->... 阅读全文
posted @ 2015-08-06 18:13 傾聽雨落 阅读(139) 评论(0) 推荐(0) 编辑
摘要: scala 数组分为定长数组(Array)和变长数组(ArrayBuffer): 定长数组: /** * 定长数组 */ val array = new Array[Int](10) //定长数组 长度为10 初始化值为0 val strs = new Array[String]... 阅读全文
posted @ 2015-08-06 16:25 傾聽雨落 阅读(324) 评论(0) 推荐(0) 编辑