When you set a method as final, it means : “You don’t want any class override it”, but constructor by JLS definition can’t overridden,so it is clean.
When you set a method as ‘abstract’,it means:”Method don’t have any body and you want to implement it at another time in a child class”, but the constructor is called implicitly when the new keyword is used so it can’t lack a body.
When you set a method as ‘static’, it means: “Method belong to class, not a particular object” but constructor implicitly called to initialize an object, so there is no purpose in having a static constructor.
public class FinalConstructor { //Illegal modifier for the constructor in type FinalConstructor; //only public, protected & private are permitted private final FinalConstructor () { } }
As static function can be accessed without creating object and thus whole crisp of using Constructor is destroyed.
Can abstract keyword be used with constructor? Explain.