Pair and Triple 

Pair and Triple can store different values that are closely linked to each other, for example, a product name and price, x and y coordinates of a graph, or a phone book with a name, phone number, address, and so on. We can store these values by declaring a class and combining them in one object, but it is always good if a similar task can be performed by using pre-declared Kotlin classes. In this section, we will take a look at how to use Pair and Triple and how these data types help to organize different values in one place.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.176.228