title: Sorting an ArrayList of ArrayLists by an index in the inner ArrayList
body: <p>I have an arrayList of firstName, lastName, address, email, and phoneNumber and an arrayList of multiple "entries" each with all 5 of those indexes. The methods to get and set all 5 of those values are all in the Entry class while adding, modifying, deleting, and sorting entries is done in the class Contact List.</p>
  
  <p>I'm trying to sort the entries by last name and print them out in the ContactList class. I have:</p>
  
  <pre><code>public void listEntries()
      {
          Collections.sort(entries);
  
          for (int i = 0; i &lt; entries.size(); i++)
          {
  
              entries.get(i).print();
          }
      }
  </code></pre>
  
  <p>I know I'm missing something to define what to sort by, but I'm not even sure if I should be using Collections.sort. Any suggestions?</p>