首页 > 解决方案 > 如何解决此错误 - 错误:找不到符号

问题描述

错误:找不到符号 this.owner = new owner(ownername, phonenumber);

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;
    }
}

我创建了一个拥有所有者姓名和电话号码的所有者类,所以我想从该类中获取所有者姓名和电话号码。但是当我尝试那样做时。我收到了那个错误。

标签: java

解决方案


推荐阅读