Sort List of Objects by Property

yourList.sort(Comparator.comparing(obj -> obj.getYourProperty));

Sort List of String:
list.sort(String::compareToIgnoreCase);

Không có nhận xét nào:

xóa toàn bộ commit

  Cách chuẩn & đơn giản nhất (Khuyến nghị) Mục tiêu Xóa toàn bộ commit history Giữ nguyên code hiện tại main chỉ còn 1 commit...