Why constructor Cannot be declared as abstract in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of Manchester, Lives in Manchester, UK.
When you set a method as final it means: "You don't want any class override it." But the constructor (according to the Java Language Specification) can't be overridden, so it is clean. ... But the constructor is implicitly called to initialize an object, so there is no purpose in having a static constructor.
2023-06-16 06:42:33
评论(499)
Helpful(122)
Helpful
Helpful(2)

Ethan Reed
QuesHub.com delivers expert answers and knowledge to you.
When you set a method as final it means: "You don't want any class override it." But the constructor (according to the Java Language Specification) can't be overridden, so it is clean. ... But the constructor is implicitly called to initialize an object, so there is no purpose in having a static constructor.