Scala

Scala Collections Package Hierarchy

The following figure shows all collections in package scala.collection. These are all high-level abstract classes or traits, which generally have mutable as well as immutable implementations. The following figure shows all collections in package scala.collection.immutable The following figure shows all collections in package scala.collection.mutable              All collection classes are found in the package scala.collection or… Continue reading Scala Collections Package Hierarchy

Scala

Lists in Scala with examples

Scala Lists are always immutable and dynamically growable (but arrays are fixed in Scala once you create with some size ). If you want Mutable List then prefer to use ListBuffer(it is in scala.collection.mutable  package). Here will see about creation of List and operations on it. Different ways of Creating a List : Val samplelist… Continue reading Lists in Scala with examples