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
而不是字串?