我在的功能方面遇到问题ArrayList。我正在尝试通过指定ArrayList的对象来删除它们ID。createEmployee我Main班上有一个方法:
public void createEmployee(){
String typeofemployee = sc.nextLine();
UUID uniqueID = UUID.randomUUID();
String x = "" + uniqueID;
System.out.println("The new ID of the " + typeofemployee + " is: " + uniqueID + ".");
System.out.println("What's the name of the new " + typeofemployee + "?");
name = sc.nextLine();
System.out.println("What's the salary of the new " + typeofemployee + "?");
salary = sc.nextDouble();
Employee employee = new Employee(x, name, salary);
switch (typeofemployee) { …Run Code Online (Sandbox Code Playgroud)