我该如何解决此错误-错误:找不到符号

时间:2020-03-01 10:43:20

标签: java

错误:找不到符号this.owner =新所有者(所有者名称,电话号码);

public class Car extends Vehicle{
    private String body;
    private String type;
    private int ccRating;
    protected static Owner owner;

    public Car(String body, String type, int ccRating)
    {
            super (ownername, telephonenumber, chassisNum, color, estimatedVal, year);
            this.owner = new owner(ownername, telephonenumber);
            this.body = body;
            this.type = type;
            this.ccRating = ccRating;
    }
}

我创建了一个拥有者名称和电话号码的Owner类,因此我只想从该类中获得拥有者名称和电话号码。但是当我尝试那样做时。我遇到了错误。

0 个答案:

没有答案