title: Why can't I call Collections.sort() on my ArrayList<T>?
body: <p>For anyone who might have a question like this, you probably need "Collections.sort", not "Collection.sort", the mistake I made below.</p>
  
  <p>I have defined a class defined as</p>
  
  <pre><code>public class Store implements Serializable, Comparable&lt;Store&gt; { ... }
  </code></pre>
  
  <p>I have a field in another class defined as:</p>
  
  <pre><code>ArrayList&lt;Store&gt; fStores = new ArrayList&lt;Store&gt;();
  </code></pre>
  
  <p>I want to sort this collection, so in a method I call:</p>
  
  <pre><code>Collection.sort(fStores);
  </code></pre>
  
  <p>However, I get the following compilation error:</p>
  
  <pre><code>The method sort(ArrayList&lt;Store&gt;) is undefined for the type Collection
  </code></pre>
  
  <p>ArrayList implements List, and from the documentation:</p>
  
  <pre><code>public static &lt;T extends Comparable&lt;? super T&gt;&gt; void sort(List&lt;T&gt; list)
  </code></pre>
  
  <p>So, why do I get the error? I have also tried creating my own descendant of Comparator and passing that to the sort method with no luck.</p>
  
  <p>I'm guessing there's something about "&lt; T extends Comparable&lt; ? super T > >" I'm not understanding... ?</p>