Collection element: Difference between revisions
From Coderwiki
More actions
new: info, index |
(No difference)
|
Latest revision as of 11:55, 15 August 2025
An element of a collection is an item of the collection.
Element index
edit edit sourceEvery element in a collection has an index based on where it is in the collection.
This index is not always an integer and does not always determine where it is stored in memory. In a hashmap for example, elements are given a hashmap key, which could be any hashable type, for example, a string.