Kotlin Collection

Kotlin Set

In this tutorial, we will talk about Kotlin Set with the help of simple examples. Sets are: An unordered collection of elements. Duplicate elements are not allowed in sets. In Kotlin, we can have both a mutable set and an immutable set. Kotlin Immutable Set The immutable set also known as read-only set support only read-only access to the set. Immutable set …

Kotlin Set Read More »

Kotlin List

In this tutorial, we will talk about Kotlin List with the help of simple examples. List  An ordered collection of elements. The ordered is maintained through indices (same as arrays). Indices start from zero(the index of the first element) and go to lastIndex which is the (list.size – 1). An element (including null) can occur …

Kotlin List Read More »