• 2022-06-07
    定义类如下:class Hello(): def __init__(self,name): self.name=name def showInfo(self): print(self.name)下面代码能正常执行的 ( )。
    A: h = Helloh.showInfo()
    B: h = Hello()h.showInfo('张三')
    C: h = Hello('张三')h.showInfo()
    D: h = Hello('admin')h.showInfo