title: public static <T> void sort(T[] a, Comparator<? super T> c) is not working
body: <p>my Arrays.sort() command using comparator is not working. I want to sort the array in descending order. My program is as follows:</p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  
  class MinScalProd
  {
  public static void main(String[] ar) throws IOException
  {
  Scanner input=new Scanner(new File("Min.in"));
  FileWriter fw = new FileWriter("Min.out");
  int T=input.nextInt();
      for(int cases = 1; cases &lt;= T; cases++)
      {
          int n=input.nextInt();
          int[] v1=new int[n];
          int[] v2=new int[n];
          int sp=0;
          for(int i=0;i&lt;n;i++)
  
  
          {
              v1[i]=input.nextInt();
          }
          for(int i=0;i&lt;n;i++)
          {
              v2[i]=input.nextInt();
          }
          Comparator comp = Collections.reverseOrder();
          Arrays.sort(v1);
          Arrays.sort(v2,comp);/*here it is giving error(Cannot find symbol)*/
          for(int i=0;i&lt;n;i++)
          {
          sp=sp+v1[i]*v2[i];
          }
          fw.write("Case #" + cases + ": "+sp+"\n");
  
  
      }
  fw.flush();
  fw.close();
  }
  }
  </code></pre>
  
  <p>I hope that you guys will solve it real quick</p>