title: Sorting ints in java returns negative numbers first?
body: <p>I have a comparator like so:</p>
  
  <pre><code>Collections.sort( sortedPlayers, new Comparator&lt;RoundPlayer&gt;()
  {
      public int compare(RoundPlayer p1, RoundPlayer p2)
      {
          return p1.getScore() - p2.getScore();
      }
  });
  </code></pre>
  
  <p>Sorted players is a list of player objects, the scores they return are ints such as, 200, -300, 1000 etc.</p>
  
  <p>The goal of the comparator is to sort them so they are descending order, 1000, 200, -300.</p>
  
  <p>However this comparator seems to return erratic results. Often with negative numbers coming out first.</p>