title: Sorting ArrayList by multiple properties
body: <p>I have an <code>ArrayList</code>of players with an attribute of <code>username</code> of type string and <code>winratio</code> of type long which is just a ratio of <code>gameswon/gamesplayed*100</code>. </p>
  
  <p>I want to sort the <code>ArrayList</code> by <code>username</code> which I have already done using a <code>Comparator</code> class, however I also want to make another method that sorts the players based <code>winratio</code> and if they have equal <code>winratio</code> to order them in terms of their <code>username</code>. I am not sure on how to combine the two comparators together and give them a hierarchy so it knows which sort to preference over another.</p>
  
  <p>Thanks</p>