Kotlin HashMap getValue()
Syntax & Examples


Syntax of HashMap.getValue()

The syntax of HashMap.getValue() extension function is:

fun <K, V> Map<K, V>.getValue(key: K): V

This getValue() extension function of HashMap returns the value for the given key or throws an exception if there is no such key in the map.