hei. the language is java. i want to extend this class which the constructor has parameters.
this is the main class
public class CAnimatedSprite {
The first statement of your constructor must be a call to superclass constructor. The syntax is:
super(pFn, pWidth, pHeight);
It is up to you to decide, whether you want constructor of your class to have same parameters and just pass them to superclass constructor:
public CMainCharacter(String pFn, int pWidth, int pHeight) {
super(pFn, pWidth, pHeight);
}
or pass something else, like:
public CMainCharacter() {
super("", 7, 11);
}
And don't specify return type for constructors. It's illegal.