Can one abstract class extend another abstract class and increase functionality

前端 未结 5 823
灰色年华
灰色年华 2021-02-01 03:15

I have an abstract class. I want to extend the abstract class by another abstract class and then implement the extended abstract class. Is it possible .If yes, whether it\'s a g

5条回答
  •  梦谈多话
    2021-02-01 03:34

    Yes you can do it. And it is good practice if your child class adds more functionality. It allows to move toward specification. Your parent class becomes a more general class and child class a more specific one. And you can implement both as per your requirement.

提交回复
热议问题