my question is:
What is the purpose of having constructors in the abstract classes if the daughter classes can not instantiate it?
Greetings.
my question is:
What is the purpose of having constructors in the abstract classes if the daughter classes can not instantiate it?
Greetings.
In an abstract class, the constructor that is in a subclass can call the constructor. An answer in StackOverflow (English) has an example.
Why? To impose restrictions on subclasses and that was the decision of Java designers. Please note that subclasses are not required to call the constructor, but it is possible to be convenient.