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
  • 6,705
  • 14
  • 41
  • 48

1 Answers1

1

super has to be always called first in the constructor

DZDomi
  • 1,626
  • 17
  • 13