title: How do I make this merge sort go in descending order rather than ascending?
body: <p>This is probably a fairly simple problem. I just can't figure out how to make this sort in descending order rather than ascending. Can anyone help me out?</p>
  
  <pre><code>public static void sortYear(Movie4[] movies, int low, int high)
  {
      if ( low == high ) 
          return; 
      int mid = ( low + high ) / 2; 
      sortYear( movies, low, mid ); 
      sortYear( movies, mid + 1, high ); 
  
      mergeYears(movies, low, mid, high ); 
  }
  
  public static void mergeYears(Movie4[] movies, int low, int mid, int high)
  {
  
      Movie4[] temp = new Movie4[ high - low + 1 ]; 
      int i = low, j = mid + 1, n = 0; 
      while ( i &lt;= mid || j &lt;= high ) 
      { 
          if ( i &gt; mid ) 
          { 
              temp[ n ] = movies[ j ]; 
              j++; 
          } 
          else if ( j &gt; high ) 
          { 
              temp[ n ] = movies[ i ]; 
              i++; 
          } 
          else if ( movies[ i ].getYear() &lt; movies[ j ].getYear()) 
          {   
              temp[n] = movies[i];
              i++;
          }
          else
          {
              temp[n] = movies[j];
              j++;
          }
          n++;
      }   
      for ( int k = low ; k &lt;= high ; k++ ) 
      {
          movies[ k ] = temp[ k - low ]; 
      }
  }
  </code></pre>