Can an abstract class have a constructor?

前端 未结 22 2458
甜味超标
甜味超标 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:16

    Yes..It is like any other class. It can have a constructor and it is called after creating object for the base class.

提交回复
热议问题