In Scala, you will find mutable and immutable collections. A collection can have a mutable implementation and an immutable implementation. That's the reason why, in Java, a List can't be both a LinkedList and an ArrayList, but List has a LinkedList implementation and an ArrayList implementation. The following figure shows all collections in the package scala.collection.immutable:
Scala imports the immutable collections by default, and if you need to use a mutable one, then you need to import it yourself. Now to get a brief overview of all collections in package scala.collection.mutable, refer to the following diagram:
In every OOP and functional programming language, an array is an important collection package that helps us to store data objects so that, later on, we can access them very easily as well. In the next subsection, we will see a detailed discussion on arrays with some examples.