If I use dictionaryWithObjects:forKeys:, and my array of keys happens to have duplicates, what happens? I presume the last instance of the duplicate key will be the value associated with the key; is that correct?
If I use dictionaryWithObjects:forKeys: , and my array of keys happens to have duplicates,
Share
The docs say:
Since a dictionary can’t have multiple entries for the same key, yes, the “steps through” strongly implies that later elements in the initializing arrays will clobber earlier ones.