'title' has private access in 'test.Item'
报错'title' has private access in 'test.Item'
父类中的title是private的,子类可以通过super()传递过去,但是不能访问。
如果需要打印title,应该在父类中新建print()方法,然后在子类中打印super.print().
报错'title' has private access in 'test.Item'
父类中的title是private的,子类可以通过super()传递过去,但是不能访问。
如果需要打印title,应该在父类中新建print()方法,然后在子类中打印super.print().