You need a collection to represent secret agents. Every agent has a unique codename that identifies them, and an Agent object that represents them. The best collection for this would be

Respuesta :

Answer:

A  HashMap< String, Agent >

is a best collection for this

Explanation:

Collection is basically a framework that is used in order to perform operations on data and to store and manipulate objects.

HashMap is a Map based collection where Map is a data structure of interface which allows the key and value pairs mapping and HashMap is a collection class used to store these key-value pairs of data.

The syntax is:

HashMap<key, value>

So in  HashMap< String, Agent > statement the String is used to store the codename for every agent and Agent is an object that represents each agent. So this is represented as key-value pair using HashMap.