标签:
val buf = new ListBuffer[Int] val l1 = List(1,2,3,4,5) for (x<-l1) buf += x+1; println(buf) val l2 = buf.toList println(l2)
sCA
原文地址:http://www.cnblogs.com/gnivor/p/4193048.html