Retrieving Objects in Collections Click on the banner to return to the user guide home page. We have defined the major objective of collection classes as storing and retrieving objects. How you retrieve or find an object depends on its properties. The values of all the instance variables or attributes of an object determine its state. These can change.
Languages use different methods for establishing an object's identity.
Each object is associated with one and only one address. Note that the reverse is not always true, because of inheritance. Some collection classes can support either, some only one. The important thing for you to keep in mind is which one you mean. For example, test two strings for the same value.