Some questions about abstract class with private, public and protected constructors

前端 未结 5 1249
北海茫月
北海茫月 2021-02-09 21:30

My first question: What is the difference between an protected and a public constructor in an abstract class?

My second questions: Does it make sense, if the abstract cl

5条回答
  •  借酒劲吻你
    2021-02-09 22:17

    To clarify my first questions, I will answer again(without commenting). So, I know that is not possible to instansite abstract class directly. Only if a class derives from the abstarct class, can be instansiated. I know that a class can have constructor like private, public, internal and also protected. What protected mean, I know.

    But what the difference between a public a protected constructor in an abstract class. I can not see the difference beteween there twos.

提交回复
热议问题