Can an abstract class have a constructor?

前端 未结 22 2685
甜味超标
甜味超标 2020-11-22 05:25

Can an abstract class have a constructor?

If so, how can it be used and for what purposes?

22条回答
  •  感动是毒
    2020-11-22 06:01

    Yes it can, abstract classes constructors are generally used for super calls for initialization events common to all the subclasses

提交回复
热议问题