NSLog(@"%@",[NSStringstringWithFormat:@"%@",nil]);
NSArray* array = [NSArrayarrayWithObjects:[NSNullnull],[NSStringstringWithFormat:@"%@",nil], nil];
NSObject* o1 = [array objectAtIndex:0];
NSObject* o2 = [array objectAtIndex:1];
BOOL inull = (NSNull*)responsibility == [NSNull null];
Class class = NSClassFromString(responsibility);
Class class2 = [responsibility class];
if (responsibility==nil) {
NSLog(@"responsibility is nil.");
}
if (responsibility==NULL) {
NSLog(@"responsibility is NULL.");
}
[NSNull null] 是个单例 仅仅为了在集合中表示空数值 集合中不能有nil
if ((NSNull*)responsibility==[NSNull null]) {
NSLog(@"responsibility is nsnull.");
}
if ([(NSNull*)responsibility isEqual:[NSNull null]]) {
NSLog(@"responsibility is nsnull.");
}
if (responsibility.length) {
NSLog(@"responsibility is length ::%d.",responsibility.length);
}
//--o2
if (o2==nil) {
NSLog(@"o2 is nil.");
}
if (o2==NULL) {
NSLog(@"o2 is NULL.");
}
if ((NSNull*)o2==[NSNull null]) {
NSLog(@"o2 is nsnull.");
}
//--o1
if (o1==nil) {
NSLog(@"o1 is nil.");
}
if (o1==NULL) {
NSLog(@"o1 is NULL.");
}
if ((NSNull*)o1==[NSNull null]) {
NSLog(@"o1 is nsnull.");
}