摘要:
抽象类就是为了实现继承; 抽象类不能实例化; 抽象类中的抽象方法不能用方法体; 抽象方法不能设置为private; 继承于抽象类的非抽象派生类必须重写实现其基类的所有抽象方法; 阅读全文
posted @ 2019-05-03 22:36
liliyou
阅读(121)
评论(0)
推荐(0)
摘要:
class Person{ constructor(name,age){ //直接写属性 this.name=name; this.age=age; console.log('a'); } showName(){ //直接可以写方法 return this.name } showAge()... 阅读全文
posted @ 2019-05-03 10:38
liliyou
阅读(266)
评论(0)
推荐(0)

浙公网安备 33010602011771号