import scala.collection.mutable.ArrayBuffer @main def main(): Unit = val a = ArrayBuffer(1, 2, 3) // b is another name for the SAME buffer val b = a b += 4 // the change shows through a as well println(a)
two names, one object