It was confusing, but after reading a lot of articles on the Internet, I had a slight gain.
1. Class and Class
Class refers to classes, which are types of objects (object). For example NSString *str = [[NSString alloc]init]; NSString is a class, which is the type of the object str.
Class refers to the type of classes, such as: Class AClass = [NSString class]; AClass is a class, nsstring this class, and class lying aclass type.
2, nil, nil, NSNull, NULL
Nil is a pointer to an object that becomes empty, such as nsstring *str = nil, for the object
Nil is a pointer to a class that becomes empty, such as class AClass = Nil
Nsnull is a class, a class that represents a null value. You can create an empty object with the class method + (NSNull *) null. Generally used for objects with null values in the collection
Nil cannot be stored in the Foundation collection because nil is used as a flag to end the set.
Nsarray *array = [Nsarray arraywithobjects:@ "one", @ "one", nil];
Use of Errors
Nsmutabledictionary *dict = [Nsmutabledictionary dictionary];
[Dict setobject:nil forkey:@ "Somekey"];
The right use
Nsmutabledictionary *dict = [Nsmutabledictionary dictionary];
[Dict setobject:[nsnull null] forkey:@ "Somekey"];
Null is to let the pointer to type C become empty, such as int *a = NULL;
Thanks for the guidance of this article http://www.3lian.com/edu/2015/06-09/220517.html
OC Nil, Nil, NULL, NSNull, class, class