title: Collections sort with custom comparator does not work
body: <p>I have created a custom Comparator to sort an ArrayList of Strings.  I have run it through the debugger and watched it comparing and returning values correctly.  However, my array is not sorted.  Since I am new to Java &amp; Android, there might be something else going on.</p>
  
  <p>After looking at it for a few hours, I can't figure out what .. and since I have been using this site to answer so many other questions, I knew where to come to !</p>
  
  <pre><code>    Collections.sort(allWords, new Comparator&lt;String&gt;(){
          public int compare(String o1, String o2) {
              scoreWord sc1 = new scoreWord((String)o1);
              scoreWord sc2 = new scoreWord((String)o2);
              int i1 = sc1.getScore();
              int i2 = sc2.getScore(); 
              if ( i1 &gt; i2 )
                  return 1;
              return 0;
          }
  
          public boolean equals(String o1, String o2) {
              scoreWord sc1 = new scoreWord((String)o1);
              scoreWord sc2 = new scoreWord((String)o2);
              int i1 = sc1.getScore();
              int i2 = sc2.getScore(); 
              if ( i1 == i2 )
                  return true;
              return false;
          }
       });
  </code></pre>