摘要: val a = List(1,2,3,4); //遍历循环 for(i <- a) print(i) for(i <- 0 to a.length-1) println(a(i)) for(i <- 0 until a.length) print(a(i)) //foreach迭代打印 a.fore 阅读全文
posted @ 2021-03-15 22:10 不忘初心_LZY 阅读(17) 评论(0) 推荐(0) 编辑