I'm new to Java. I'm having issues passing a List variable that is part of a constructor definition when I created an object of the class
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");
gives an error: "constructor "Str,str,str" not defined."
I need help on how to pass the allergy