If you want to use both mutable and immutable Maps in the same, then you can continue to refer to the immutable Map as Map but you can refer to the mutable set as mutable.Map.
If you want to change selection, open document below and click on "Move attachment"
Scala Maps and immutable objects is that when an object is immutable, the object itself can't be changed.
By default, Scala uses the immutable Map. If you want to use the mutable Set, you'll have to import scala.collection.mutable.Map class explicitly. <span>If you want to use both mutable and immutable Maps in the same, then you can continue to refer to the immutable Map as Map but you can refer to the mutable set as mutable.Map. Following is the example to declare immutable Maps as follows:
// Empty hash table whose keys are strings and values are integers:
var A:Map[Char,Int] = Map()
// A map with keys and val
Summary
status
not read
reprioritisations
last reprioritisation on
suggested re-reading day
started reading on
finished reading on
Details
Discussion
Do you want to join discussion? Click here to log in or create user.