Write a method that returns objects from a list that have a date equals to a given date.
public static List<Person> getPersonsForDate(List<Person> persons, LocalDate date) { List<Person> personList = new ArrayList<Person>(); for (Person p : persons) { if (p.getBirthday().equals(date)) { personList.add(p); } } return personList; }