Can an abstract class can have a constructor? If so, What will be its importance? Since abstract is a class where we can't create its instance. In such scenario, what will be the use of constructor for the abstract class?
Yes, abstract classes can define constructors. The main reason to use abstract classes is to go some way to define the structure of classes that extend it. So if you decide that all child classes cannot use an empty constructor you could define a private empty constructor in your abstract class and all classes that extend it will now not be able to use a no args constructor.