public int compareTo(Scout s) { if (marks == s.getMarks()) { return dateOfBirth.compareTo(s.getDateOfBirth()); } return marks - s.getMarks(); }