java - 如何解决此错误 - 错误:找不到符号
问题描述
错误:找不到符号 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;
}
}
我创建了一个拥有所有者姓名和电话号码的所有者类,所以我想从该类中获取所有者姓名和电话号码。但是当我尝试那样做时。我收到了那个错误。
解决方案
推荐阅读
- rest - 从嵌入式可视化表中读取数据
- docker - 无法在给定端口的 docker 上看到 Shiny 应用程序?
- python - After deleting a file from my local machine, how do I pull from github to obtain that file again?
- python - 试图进行程序性幻想相遇
- powershell - Docker Healthcheck 没有运行 powershell 命令?
- java - 返回带有字符 [a,b,b,c] 的单词
- setuptools - 尝试安装 Distutils 并收到我需要 distutils.core 的错误
- c# - 如何将单选按钮选择与 C# 中的变量值进行比较?
- sql-server - 使用地理点 SQL Server 查找位于另一个内部的段
- c - 如何在c中打印数据包的全部数据?