What's the difference between a dictionary and an array?
What is the difference between a dictionary and an array, especially when working with PLIST files? What are the advantages of using one over the other? Thanks! Both NSDictionary and NSArray are collection classes, i.e. the group together other objects. An NSArray is an 'ordered collection' - every item in the collection has an integer index, so there is an explicit order to the items. If you swap the order of items in the collection then the collection is no longer the 'same' as the order is different. An object may appear more than once in the collection. An NSSet is an 'unordered collection