scala> // toArray, toList #354 scala> val data = List("a", "b", "c", "d", "e", "f") data: List[String] = List(a, b, c, d, e, f) scala> val arr = data.toArray arr: Array[String] = Array(a, b, c, d, e, f) scala> val lst = arr.toList lst: List[String] = List(a, b, c, d, e, f) scala> scala> // copyToArray scala> val arr = new Array[Int](7) arr: Array[Int] = Array(0, 0, 0, 0, 0, 0, 0) scala> arr.size res18: Int = 7 scala> val lst = List(5, 6, 7) lst: List[Int] = List(5, 6, 7) scala> lst.copyToArray(arr, 3) scala> arr res20: Array[Int] = Array(0, 0, 0, 5, 6, 7, 0) scala> scala> // iterator scala> val data = List("a", "b", "c", "d", "e", "f") data: List[String] = List(a, b, c, d, e, f) scala> val it = data.iterator it: Iterator[String] = non-empty iterator scala> it.next res21: String = a scala> it.next res22: String = b