ArrayList<StudentInformation> infos = new ArrayList<StudentInformation>(); // fill array Collections.sort(infos, Comparator.comparingInt(StudentInformation::getBirthYear).reversed());