Java error: Implicit super constructor is undefined for default constructor

前端 未结 10 987
借酒劲吻你
借酒劲吻你 2020-11-22 10:28

I have a some simple Java code that looks similar to this in its structure:

abstract public class BaseClass {
    String someString;
    public BaseClass(Str         


        
10条回答
  •  渐次进展
    2020-11-22 11:20

    Sorry for necroposting but faced this problem just today. For everybody also facing with this problem - one of he possible reasons - you don't call super at the first line of method. Second, third and other lines fire this error. Call of super should be very first call in your method. In this case everything is well.

提交回复
热议问题