Chapter 6
KTX Extensions for Easier Access to Android APIs
Section 4
Using Collection KTX Module for Extensive Collection Support
Creating certain types of collections such as ArraySet will involve code to manually create a value and then populate the items in the array one at a time, before returning the populated ArraySet. Use the KTX collection module to create an ArraySet with a single method call. - Demonstrate the issue by implementing an ArraySet the Android way - Replace the Android code with the KTX collection arraySetOf method - Run code to verify that the same ArraySet collection is created