```
import Foundation
classPerson:NSObject{
class func say(){
print("Person")
}
}
classTeacher :Person{
override class func say(){
print("Teacher")
}
}
classStudent :Person{
}
classProfessor :Teacher{
}
Teacher.say() //Teacher
Student.say() //Person
Professor.say() //Teacher
```
java的童鞋一定要注意啊。
网友评论