title: Using Arrays library to merge sort an int array
body: <p>I want to use the function </p>
  
  <pre><code>public static void sort(Object[] a)
  </code></pre>
  
  <p>To sort an int array but I am not sure how to do it so that I know definitely sure that it is using the merge sort and not any other sort.</p>
  
  <p>Here is the Java documentation: <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html</a></p>
  
  <p>And below is what I think would be a correct implementation of the function in order to use the merge sort.</p>
  
  <pre><code> public static void main(String[] args) {
       int arr[] = { 3, 2, 4, 1, 99, 30, 5, 3 };
       Arrays.sort(arr);
   }
  </code></pre>
  
  <p>Would this be correct? And further I wanted to specify an index from where to start sorting etc with </p>
  
  <pre><code>sort(Object[] a, int fromIndex, int toIndex)
  </code></pre>
  
  <p>How would I make sure to write up the code so that it used the merge sort and not quick sort.</p>