© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.