Outline the standard operations of collections.


Teaching Note:

These are: addition and retrieval of data.


Sample Question:


JSR Notes:

More on "collections" later, and actual implementations of a couple of Collections classes of Java, namely:
- ArrayList which is an array which actually works dynamically like a list,
- LinkedList which is a full implementation of a linked list

But, yes, as in the Teaching Note above, collections in general are data types to which we can add, and from which we can retrieve. So you could say that all structures such as arrays and linked lists and trees are collections. When we get into the Collections classes mentioned above, we'll see that they have actual methods called things like "add()", and "removeLast()", which has them operate more clearly as certain types of collections, such as stack and queue.

Still, back to the first important point at this introductory stage, the main operations of collections are, generally, to add and to retrieve data.

Refer to 4.3.10 for a related assessment statement.

(And if you really want to see ArrayList and/or LinkedList in operation, you could look ahead to D.4.11.)