October 2018
Intermediate to advanced
370 pages
9h 15m
English
A list contains a collection of single objects. Maps, on the other hand, are data structures that hold collections of key value pairs. In Kotlin, there are three different types of pairs:
The following is an example of a pair:
var p1 = Pair(1,"One")var p2 = 2 to "Two"
Just like other Kotlin collections, there are two types of maps:
In this section, we will start by looking at immutable maps.
Read now
Unlock full access