import Foundation protocol Student{ func sayHi() } class Persion:Student{ var _name:String init(name:String) { self._name = name } func sayHi() { print("\(self._name) say hi") } } var per = Persion(name: "liaojianguo") per.sayHi()
import Foundation protocol Student{ func sayHi() } class Persion:Student{ var _name:String init(name:String) { self._name = name } func sayHi() { print("\(self._name) say hi") } } var per = Persion(name: "liaojianguo") per.sayHi()