13.1 Introduction
A collection is a container that holds data while it is being manipulated by a computer program. More specifically, it is a data structure that consists of zero or more items, where each item contains its own value or values. Examples of collections include stacks, queues, linked lists, and sorted lists. The total number of items in a collection is its count. Unlike an array, a collection is dynamically allocated in memory. That is, its capacity is automatically increased (through memory reallocation) as additional items are added to it. Like an ...