ArrayList<StudentInformation> infos = new ArrayList<StudentInformation>(); // fill array Collections.sort(infos, (s1, s2) -> Integer.compare(s2.getBirthYear(), s1.getBirthYear()));