Kotlin provides a wide range of classes for managing collections of data.

We have already seen some of the classes that allow managing collections:

  • For basic data types (optimized)
    ByteArray 
    ShortArray
    LongArray
    FloatArray
    DoubleArray
    BooleanArray
    CharArray
    
  • For any type of data:
    Array
    
  • List
    MutableList
    
  • Map
    MutableMap
    
  • Set
    MutableSet
    

We already worked on previous concepts with the arrays that store basic data types and with the class Array that allows us to store any type of data. In the next concepts we will see the classes List, Map and Set.

In order to manage lists (List), maps (Map) and sets (Set) there are two large groups: mutables (that is, after being created we can add, modify and delete elements) and immutable (once the collection is created we can not modify the structure)

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!