(null) and <null>, what differences between?

ios, objective-c

Solution

When `NSLog` outputs `(null)`, it means that it was literally passed in `0x0`, or `NULL`.

When it outputs `<null>`, it means that it was passed in `[NSNull null]`, instead.

`NSNull`'s are commonly used in arrays & other collections that cannot store `nil` by default. Thus, a special object is used instead.

Problem

When i try to display the value of a Dictionary value: ``` NSLog(@"%@",[self.user valueForKeyPath:@"age"]); ``` The first time, i got `(null)`, the second time i got `<null>` What differences does exist between the two result? Thanx in advance.

Original source