Both methods return equal results. Of course, -[NSObject isEqual:] doesn’t compare the pointers of objects, it somehow check the inner fields or whatever. So what’s the point of using exactly -[NSNumber isEqualToNumber:] to compare two NSNumbers?
Both methods return equal results. Of course, -[NSObject isEqual:] doesn’t compare the pointers of
Share
From the docs:
So it handles id equals and number comparison.