NSArray *array = [NSArrayarrayWithObjects:@"1",@"2",@"3",@"4",@"2", nil];
NSMutableSet *set = [[NSMutableSetalloc]init];
for(NSString *str in array) {
[set addObject:str];
}
NSLog(@"%lu",[set count]);
[set release];
控制台打印的结果是:( )
25题 | 被引用2次