title: Sort an array of custom objects in descending order on an int property
body: <p>I would like to sort my array in descending order by year of birth.
  My array has two other elements which are of type String.
  So, as an example the person who was born in the earliest year, such as 1939, would be at the top, then so on.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.util.*;
  public class StudentInformationTest
  {
  public static void main (String [] args){ 
      StudentInformation[] studentInfo = new StudentInformation[10];
  
      studentInfo[0] = new StudentInformation("Student A",1971, "BSc FDIT");
      studentInfo[1] = new StudentInformation("Student B",1964, "BSc FDIT"); 
      studentInfo[2] = new StudentInformation("Student C",1996, "BSc FDIT"); 
      studentInfo[3] = new StudentInformation("Student D",1939, "BSc FDIT"); 
      studentInfo[4] = new StudentInformation("Student E",1945, "BSc FDIT"); 
      studentInfo[5] = new StudentInformation("Student F",1991, "BSc FDIT"); 
      studentInfo[6] = new StudentInformation("Student G",1987, "BSc FDIT"); 
      studentInfo[7] = new StudentInformation("Student H",1968, "BSc FDIT"); 
      studentInfo[8] = new StudentInformation("Student I",1968, "BSc FDIT"); 
      studentInfo[9] = new StudentInformation("Student J",1973, "BSc FDIT"); 
  
      printInfo(studentInfo);
      printAge(studentInfo);
  }
  public static void printInfo(StudentInformation studentInfo[]){
      for(int i = 0; i &lt; studentInfo.length; i++){
          System.out.println(studentInfo[i].getStudentName() + " " +   studentInfo[i].getBirthDate() + " " + studentInfo[i].getProgrammeOfStudy());
      }
      System.out.println();
  }
  
   }
  
  }
  </code></pre>
  
  <p>Once I manage to print the birth years in descending order I also need to show the student name and the university modules they are doing. 
  I know other questions have been asked how to do this but I have not been able to see one with other objects.
  This is a class session so please forgive any errors in my code.</p>