Dictionaries and arrays are divided into mutable and immutable
Self-created general for variable (in-load data)
Use other people's general as immutable (take data from it)
Interview question: What can key in the dictionary write?
Generally we will write a string as key
The answer is: any object that complies with the Nscopy protocol can also be used in addition to the string NSNumber
Dictionaries and arrays can be nested with each other
A dictionary (nsdictionary,nsmutabledictionary) is a collection of data that consists of key-value pairs. As we look in the dictionary for the definition of a word.
By key (key), find the corresponding value (value), the key is usually a string object, it can be any other type of object. In a Dictionary object, the value of key must be unique.
In addition, the key and value of the Dictionary object cannot be null (nil), and if you need to include a null value in the dictionary, you can join the Nsnull object
Lan Yi iOS Training log 16 dictionary