0

What is wrong with this line of coding for java?

public class ClassB extends ClassA {
    int attributeB;
    public ClassB(int a) {
        atrributeB = a;
        super(40);
    }
}
Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51

1 Answers1

1

super has to be always called first in the constructor

DZDomi
  • 1,685
  • 15
  • 13