2
請幫我理解如何用下面方法的方法引用替換lambda表達式。用方法參考替換Lambdas。
public List<Person> sortByStartDate_ASC(LinkedHashSet<Person> personList) {
List<Person> pList = new ArrayList<Person>(personList);
Collections.sort(pList, (Person person1, Person person2) -> person1
.getStartDate().compareTo(person2.getStartDate()));
return pList;
}