Kotlin HashMap clear()
Syntax & Examples


Syntax of HashMap.clear()

The syntax of HashMap.clear() function is:

fun clear()

This clear() function of HashMap removes all elements from this map.