Hello,
The code is working properly, the switch statement is present and functions properly, however for some reason in the validation the last step is NOT validated and I get the following (non-sensical) recommendation : "Be sure that the main method has a switch statement based on args[0].".
Does anyone understand what is happening here ?
Thanks a lot
case "-i":
synchronized (allPeople){
int numberOfPeople = args.length - 1;
String[] idList = new String[numberOfPeople];
for (int i = 0; i < idList.length; i++) {
idList[i] = args[i + 1];
}
for (int i = 0; i < idList.length; i++) {
int id = Integer.parseInt(idList[i]);
Person person = allPeople.get(id);
System.out.print(person.getName() + " ");
switch (person.getSex()){
case MALE:
System.out.print("m ");
break;
case FEMALE:
System.out.print("f ");
break;
}
System.out.println(new SimpleDateFormat("MMM dd yyyy", Locale.ENGLISH).format(person.getBirthDate()));
}
break;
}