I have a class \"ChildClass\" that extends the class \"ParentClass\". Rather than completely replace the constructor for the parent class, I want to call the parent class\'s
You can reference the parent's constructor with "super", from within a child's constructor.
public class Child extends Parent {
public Child(int someArg) {
super(someArg);
// other stuff
}
// ....
}
To invoke a specific parent-class constructor, put super(param1, param2, ...)
as the first statement in the child-class constructor body.
You should use the super keyword.
public ChildClass(...) {
super(...);
}