-
Book Overview & Buying
-
Table Of Contents
Android Programming for Beginners - Fourth Edition
By :
We have covered a lot of ground in this chapter. We have learned that sets are a collection type in which unique items can be stored, and that the order of those items is not guaranteed. We discovered that the rules for val and var are distinct from the rules of set mutability and immutability. While this takes some getting used to, the rules are consistent with lists and, as we will see in the next chapter, with maps.
We have seen multiple ways to add to, remove from, test, read, and output data in our sets, as well as complete a neat set demo app.
As with List, there is so much more to Set than we have been able to cover. The reader should look up more about what you can do with sets at the official Kotlin docs website: https://kotlinlang.org/docs/collections-overview.html.
In the next chapter, we will look at one more collection type, Maps, before we move on to something totally new in Chapter 13.