© Ted Hagos 2018
Ted HagosLearn Android Studio 3 with Kotlinhttps://doi.org/10.1007/978-1-4842-3907-0_6

6. Collections and Arrays

Ted Hagos1 
(1)
Manila, National Capital Region, Philippines
 
What we’ll cover:
  • Arrays

  • Collections

  • Filter and Apply

One of the real-world analogies for collections would be a purse or a pouch filled with various things such as coins. The coins would be the items and the pouch itself is the collection. So, based on this analogy, we can say that a collection is a container of sorts that may have zero, one, or many items in it. You might remember that we already have something like that—an array. The array fits this description exactly because it can contain zero, one, or many items inside it. If this is the case, do we really ...

Get Learn Android Studio 3 with Kotlin: Efficient Android App Development now with O’Reilly online learning.

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