Constructor in class cannot be applied to given types

后端 未结 3 1057
别那么骄傲
别那么骄傲 2020-12-02 01:01

I ve got the following code using arrays to find some prim numbers. However, when trying to compile my user class PalindromeArrayUser it says - \"Constructor in class cannot

3条回答
  •  借酒劲吻你
    2020-12-02 01:21

    Error is because you extend PalindromeArray .This is not necessary. Subclass (your PalindromeArrayUser) must provide constructor with one int.

    If yous super class don't have default constructor then in you subclass constructors must invoke one of non-default constructor from super class. (super(params))

提交回复
热议问题