Yes, abstract class can have constructor in Java. You can either explicitly provide constructor to abstract class or if you don't, compiler will add default constructor of no argument in abstract class. This is true for all classes and its also applies on abstract class.
An abstract class in Java, its a class which can not be instantiated with new() operator or any other ways. In order to use abstract class in Java, You need to extend it and provide a concrete class. Abstract class is commonly used to define base class for a type hierarchy with default implementation, which is applicable to all child classes.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!