What do you mean by a Scala map?

devquora
devquora

Posted On: Feb 22, 2018

 

The collection of key-value pairs where the key can retrieve the values present in a map is known as a scala map. The keys, unlike the values in a scala map are unique. There are two types of maps present in scala:
  • Mutable
  • Immutable

By default, immutable map is supported by scala. To use the mutable map, the programmer needs to import the “scala.collection.mutable”. It is an explicit class. “mutable.map” is the syntax for using the mutable and immutable class in the same program. To access the immutable class, we just have to use the name of the map and it can be accessed.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Scala Interview Questions

    List the advantages of using scala over other functional programming languages.

    Some of the advantages due to which scala is preferred over other functional programming languages are listed below: As..

    Scala Interview Questions

    Tell the advantages of companion objects when used in Scala?

    Instead of having static methods or variables, scala has singleton or companion objects. These objects are then compile..

    Scala Interview Questions

    Which Scala library is used for the functional programming?

    pure functional data structure is present in the scala library. It also complements the standard Scala library. It also..