title: Inferred type does not conform to declared bound(s)
body: <p>I have run into an error that I have not seen before and I am not quite sure how to go about fixing it. I am currently trying to make a sorting class which compares the gradepoints inside an array, I'll add that if it would help, and I have run into this error. </p>
  
  <pre><code>  required: Course[]
    found: Course[]
    reason: inferred type does not conform to declared bound(s)
      inferred: Course
      bound(s): Comparable&lt;Course&gt;
    where Course is a type-variable:
      Course extends Comparable&lt;Course&gt; declared in method&lt;Course&gt;SelectionSort(Course[])
  </code></pre>
  
  <p>The class that is generating this error: </p>
  
  <pre><code>public class Sorting
  {
      private static &lt;Course&gt; void swap(Course[] arr, int i, int j)
      {
          if(i != j)
          {
              Course temp = arr[i];
              arr[i] = arr[j];
              arr[j] = temp;
          }
      }
  
      //Sort method
      public &lt;Course extends Comparable&lt;Course&gt;&gt; void SelectionSort(Course[] arr)
      {
          for(int i = 0; i &lt; arr.length-1; i++)
          {
              int min = i;
              for(int scan = i + 1; scan &lt; arr.length; scan++)
              {
                  if(arr[scan].compareTo(arr[min]) &lt;= 0)
                      min = scan;
              }
              swap(arr,i,min);
          }
      }//end Sorting  
  }//end class Sorting
  </code></pre>
  
  <p>Not sure how to deal with something like this, it was an old assignment that I had to do, but I couldn't get it figured out.</p>
  
  <p>Test class: </p>
  
  <pre><code>public class Test1{
  
  public static void main(String [] args)
  {
      Course[] courses = new Course[7];
      Sorting sort = new Sorting();
      courses[0] = new CSInfo("CS1083", "A+", 4);
      courses[1] = new CSInfo("CS1073", "A-", 4);
      courses[3] = new MathStat("MATH1003", "C+", 3);
      courses[4] = new MathStat("MATH1013", "B-", 3);
      courses[5] = new CSInfo("CS2053", "B-", 4);
      courses[6] = new Breadth("POLS2101", "A-", 3);
  
      courses[0].getPoints();
      courses[1].getPoints();
      //courses[2].getPoints();
      courses[3].getPoints();
      courses[4].getPoints();
      courses[5].getPoints();
      courses[6].getPoints();
  
      courses[0].toString();
  
      sort.SelectionSort(courses);
  
      }
  </code></pre>
  
  <p>}</p>