As others pointed out, you want to ArrayBuffer. In general, in Scala, a buffer is a resizable, mutable, linear dataset. In addition to ArrayBuffer, a ListBufferworks like a C # or Java variable list, and, in fact, JListWrapperwraps Java Listand works basically in the same way.
API . .