February 2018
Intermediate to advanced
350 pages
7h 35m
English
Just like List, Set also has the following two variants in Kotlin:
Set is read-only and MutableSet is the mutable version of Set, which contains the read-write functionalities.
Sets in collections represent mathematical sets (as in set theory).
The following is an example with MutableSet:
fun main(args: Array<String>) { val set = mutableSetOf(1,2,3,3,2) ...Read now
Unlock full access