Collection Data Type
Collection Data Type
List
An ordered collection that can contain duplicates.
Use it when you need to maintain the order of
elements or allow duplicates.For example, storing a
list of contacts.
Set
An unordered collection that does not allow
duplicates. Use it when you want to ensure
uniqueness of elements. For example, storing
unique IDs.
Map
A collection of key-value pairs, where each key is
unique. Use it when you need to associate unique
keys with specific values. For example, mapping
account IDs to account names.
Summary