Collections Intro
Lists, sets, maps and common collection operations.
1
kotlin collections intro
2List Basics in Kotlin
List is an ordered collection of elements. A Kotlin example with source code and sample output.
kotlin collections intro
3Mutable List in Kotlin
mutableListOf() creates a list that supports add, remove and update operations. A Kotlin example with source code and sample output.
kotlin collections intro
4Set Basics in Kotlin
Set stores unique elements without guaranteed order (for hash sets). A Kotlin example with source code and sample output.
kotlin collections intro
5Map Basics in Kotlin
Map stores key-value pairs. A Kotlin example with source code and sample output.
kotlin collections intro
6Collection Iteration in Kotlin
Collections can be iterated using for loops. A Kotlin example with source code and sample output.
kotlin collections intro
Collection Size and Empty Check in Kotlin
The size property returns the number of elements. A Kotlin example with source code and sample output.