The Java constructor is implicitly finite and implicitly static 1 and the Java constructor does not make sense to be abstract.
This means that the final and static modifiers will be redundant, and the abstract keyword does not make sense at all.
Naturally, Java developers did not see anything in resolving redundant and / or meaningless access modifiers for constructors ... therefore, they are not allowed using Java grammar.
In addition: it is a shame that they did not make the same design call for interface methods, where the public and abstract modifiers are also redundant, but allowed in any case. Perhaps there is some (ancient) historical reason for this. But in any case, it cannot be fixed without rendering (possibly) millions of existing incompatible Java programs.
1 - In fact, constructors have a mixture of static and non-static semantics. You cannot “call” a constructor in an instance, and it is not inherited or redefined. This is similar to how static methods work. On the other hand, the constructor body can refer to this and call instance methods ... as an instance method. And then there is a chain of designers that is unique to designers. But the real point is that these aspects are fixed, and it makes no sense to allow the redundant static modifier.
Stephen C Feb 28 '12 at 7:21 2012-02-28 07:21
source share