Once again, we override the click method.
再一次,我们重写了click方法。
The overridden click method increments count.
被重写的click方法会增加count。
Only the button's label field and click method remain.
只有按钮的label字段和click方法被保留了下来。
Since the new click method overrides Button's concrete implementation, the override keyword is required.
因为新的click方法重写了Button的具体实现,必须加上override关键字。
Since the new click method overrides Button's concrete implementation, the override keyword is required.
因为新的click方法重写了Button的具体实现,必须加上override关键字。
应用推荐