Starting from this:
- (int)add:(int)i and:(int)j;
This does not negate anything - this is another method:
- (int)add:(int)i and:(int)j and:(int)k;
The following is not acceptable: Objective-C does not allow declarations with a covariant or contravariant method. In addition, Objective-C makes forwarding based on the forwarding type a la Java and C ++.
- (float)add:(float)i and:(float)j;
Note that Java is derived directly from Objective-C.
bbum
source share