title: error incompatible types: Comparable<T> cannot be converted to T
body: <p>I'm not sure what is going on.
  The method works pereclty with an array but if I use a list... well.</p>
  
  <p>I really hope you can help me.</p>
  
  <pre><code>public static &lt;T&gt; void ordenaSeleccion(List&lt;? extends Comparable&lt;T&gt;&gt; datos)
  {
      Object aux;
      int menor;
  
      for (int i = 0; i &lt; datos.size(); i++) {
          menor = i;
  
          for (int j = i + 1; j &lt; datos.size(); j++) {
              if (datos.get(menor).compareTo(datos.get(j)) &gt; 0) { //error line
                  menor = j;
              }
          }
  
          if (menor != i) {
              aux = datos.get(i);
              datos.set(i, datos.get(menor));
              datos.set(menor, aux);
          }
  
      }
  }
  </code></pre>
  
  <p>this is the error:</p>
  
  <p><img src="https://i.stack.imgur.com/4pCna.png" alt="enter image description here"></p>