Invoking Superclass Constructors
- Use super keyword in subclass constructor:
public Manager(String aName)
{
super(aName); // calls superclass constructor
bonus = 0;
}
- Call to super must be first statement in
subclass constructor
- If subclass constructor doesn't call super, superclass
must have constructor without parameters