Working with APEX Collections
by Raj Mattamal
When writing applications, developers often need a way to store an unknown number of items in a temporary structure. The most pervasive example of this is the online shopping cart. When a user browses an online store, developers don’t know the number of items the user intends to purchase. To address this, application developers use collections to store these variable pieces of data.
The term collections itself is a rather general one. Many, if not most, programming techniques offer some method of storing variable collection–type data, and terms such as arrays, sets, and lists are common ...