scala> // toString #353 scala> val data = List("a", "b", "c", "d", "e", "f") data: List[String] = List(a, b, c, d, e, f) scala> data.toString res2: String = List(a, b, c, d, e, f) scala> scala> // mkString() scala> // 1st : Prefix scala> // 2nd : Separator scala> // 3rd : Displayed at the end scala> val data = List("a", "b", "c", "d", "e", "f") data: List[String] = List(a, b, c, d, e, f) scala> val res = data.mkString("hi", ":", "done") res: String = hia:b:c:d:e:fdone scala> scala> // addString() scala> val data = List("a", "b", "c", "d", "e", "f") data: List[String] = List(a, b, c, d, e, f) scala> val buffer = new StringBuilder buffer: StringBuilder = scala> val res = data.addString(buffer, "hi", ":", "done") res: StringBuilder = hia:b:c:d:e:fdone scala> scala> // Note : mkString() & addString() is also applicable to scala> // all other Collections #354