以下哪一段代码不会抛出异常 A: NSArray*array=@[@1,@2,@3];NSNumber*number=array[3]; B: idvalue;NSDictionary*dict=@{@"key":value}; C: NSString*str=nil;NSString*str2=[strsubstringFromIndex:3]; D: NSString*str=@"hi";NSString*str2=[strsubstringFromIndex:3];
以下哪一段代码不会抛出异常 A: NSArray*array=@[@1,@2,@3];NSNumber*number=array[3]; B: idvalue;NSDictionary*dict=@{@"key":value}; C: NSString*str=nil;NSString*str2=[strsubstringFromIndex:3]; D: NSString*str=@"hi";NSString*str2=[strsubstringFromIndex:3];
NSMutableDictionary *mutableDic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"lisi",@"name",[NSNumber numberWithInt:20],@"age", nil]; <br/>[mutableDic setObject:@"89" forKey:@"num"];<br/>NSLog(@"mutableDic4 = %@“,mutableDic);<br/>控制台打印是: A: name = lisi;num = 89 B: age = 20;name = lisi;num = 89 C: age = 20;name = lisi D: age = 20
NSMutableDictionary *mutableDic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"lisi",@"name",[NSNumber numberWithInt:20],@"age", nil]; <br/>[mutableDic setObject:@"89" forKey:@"num"];<br/>NSLog(@"mutableDic4 = %@“,mutableDic);<br/>控制台打印是: A: name = lisi;num = 89 B: age = 20;name = lisi;num = 89 C: age = 20;name = lisi D: age = 20
1