code
@implementation Dog
- (NSString*) bark {
return @"Woof!";
}
- (NSString*) speak {
return [self bark];
}
@end
@implementation Basenji : Dog
- (NSString*) bark {
return @"";
}
@end
Basenji* b = [Basenji new];
NSString* s = [b speak];
1.这样是呼叫Basenji class的bark method ,还是呼叫Dog class的bark method
2.为什么我编译后是出现Program ended with exit code: 0
而不是字串?