If you need to create an empty
Map in Scala, the following examples show how to create empty immutable and mutable maps.
An empty immutable Map
You can use these approaches to create an empty immutable Scala
val a = Map[Int, String]() val a = Map.empty[Int, String]
Here’s what they look like in the REPL: