A constructor from a subclass can call constructors from the superclass, but they're not inherited as such.
To be clear, that means if you have something like:
public class Super
{
public Super(int x)
{
}
}
public class Sub extends Super
{
public Sub()
{
super(5);
}
}
then you can't write:
new Sub(10);
because there's no Sub(int) constructor.
It may be helpful to think of constructors as uninherited static methods with an implicit parameter of the object being initialized.
Constructor declarations are not members. They are never inherited and therefore are not subject to hiding or overriding.
One of the main reasons is because you probably don't want to override the super classes constructor, which would be possible if they were inherited.
By giving the developer the ability to override a super classes constructor you would erode the encapsulation abilities of the language.
Ok.
Jun 18, 2013