编译时出现错误:找不到符号符号:构造函数 Team()
public class Team {
public String name;
public String location;
public double offense;
public double defense;
public Team(String name, String location) {
}
public static void main(String[] args) {
System.out.println("Enter name and location for home team");
Scanner tn = new Scanner(System.in);
Team team = new Team();
team.name = tn.nextLine();
Scanner tl = new Scanner(System.in);
team.location = tl.nextLine();
}
}
任何想法如何解决?非常感谢迈尔斯