© Peter Späth 2019
Peter SpäthLearn Kotlin for Android Developmenthttps://doi.org/10.1007/978-1-4842-4467-8_9

9. Data Containers

Peter Späth1 
Leipzig, Germany

Nature and human civilization are about collections. Families collect relatives, cities collect people acting together, houses collect people and their belongings, math set theory uses collections for relation formulas, galaxies collect stars, atoms collect elementary particles, and so on. It is thus no surprise that computer languages, intended to model real-world scenarios, must be able to model collections as well.

In the real world this is not such a big topic, but computers from the very beginning have drawn a sharp distinction between fixed-size collections and variable-size collections. ...

Get Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.