scala> import collection.mutable._ import collection.mutable._ scala> val buf = new ListBuffer[Int] buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer() scala> buf += 22 res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22) scala> buf ++= List(1, 2, 3) res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22, 1, 2, 3) scala> buf.toList res2: scala.collection.immutable.List[Int] = List(22, 1, 2, 3) scala> :quit