我是 Java 新手。当我创建类的对象时,我在传递作为构造函数定义一部分的列表变量时遇到问题
public class Patient {
private String patientfirstName;
private String patientLastName;
private List<String> allergyList;
public Patient(String patientfirstName, String patientLastName,
List<String> allergyList) {
this.patientfirstName = patientfirstName;
this.patientLastName = patientLastName;
this.allergyList = allergyList;
}
Patient patientobj = new Patient("sean","john","allegry1");
给出错误:“构造函数“Str,str,str”未定义。”
我需要如何消除过敏的帮助
慕慕森
湖上湖
慕虎7371278
泛舟湖上清波郎朗
相关分类