Kotlin HashSet clear()
Syntax & Examples


Syntax of HashSet.clear()

The syntax of HashSet.clear() function is:

fun clear()

This clear() function of HashSet removes all elements from this collection.