kotlin empty map
val emptyMap: Map<String, Int> = emptyMap()
emptyMap()
is a Kotlin function that creates an empty immutable map.val
declares a read-only (immutable) variable.emptyMap
is the name of the variable.Map<String, Int>
specifies thatemptyMap
is a map where keys are of typeString
and values are of typeInt
.= emptyMap()
initializes theemptyMap
variable with an empty immutable map of typeMap<String, Int>
.