摘要: *集合* 可变集合(collection.mutable)* ListBuffer=>内容和长度都可以改变** 不可变集合(collection.immutable)* List=>长度和内容都不可变* var list=List(1,2,3,4)** Map* Map[String,String] 阅读全文
posted @ 2019-12-06 12:04 寅狗 阅读(896) 评论(0) 推荐(0) 编辑
摘要: val words:Array[String]=Array("hello tom hello jim","hello hatno hello 菲菲")words.map(x=>x.split(" ")) .flatten .groupBy(x=>x) .map(wdKV=>(wdKV._1,wdKV 阅读全文
posted @ 2019-12-06 12:02 寅狗 阅读(117) 评论(0) 推荐(0) 编辑