Answers

Question and Answer:

  Home  Java Classes

⟩ Explain can a abstract class have a constructor? When would the constructor in the abstract class be called?

constructor can not be created in an abstract class.even though we write the constructor, when the constructor will be called..?only if the object is created. but we cannot create an object of abstract class.even though we create object using indirect way, there also, we cannot call the constructor of the abstract class.finally, constructor for the abstract class cannot be called.

 159 views

More Questions for you: