39.4k views
2 votes
In addition to adding individual objects to an ArrayList, you can also add _____ of objects. The objects must be stored in a data type that is derived from ICollection. This means that the objects can be stored in an array, a Collection, or even in another ArrayList.

1) A single object
2) A group
3) A set
4) A collection

User Shaquanda
by
8.9k points

1 Answer

4 votes

Final answer:

In coding, a collection of objects can be added to an ArrayList, where the collection must be supported by ICollection. This is similar to how we group small items in everyday life, like a dozen or a gross, for efficiency.

Step-by-step explanation:

In addition to adding individual objects to an ArrayList, you can also add a collection of objects. These objects must be stored in a data type that is derived from ICollection. Conveniently, this allows the use of various structures to hold the group, such as an array, a Collection, or another ArrayList. To provide context, when we deal with very small objects in our everyday lives, we use groupings like a 'dozen' for 12 items or a 'gross' for 144 items, because it's more practical than managing each item individually.

User Florian Wolters
by
7.9k points