src/share/classes/sun/misc/Sort.java

Print this page
rev 7896 : 8023395: Deprecate sun.misc.Sort and sun.misc.Compare
Reviewed-by: duke

@@ -21,19 +21,22 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
+package sun.misc;
+
 /**
  * Sort: a class that uses the quicksort algorithm to sort an
  *       array of objects.
  *
+ * @deprecated Use
+ * {@link java.util.Arrays.sort(Object[], int start, int end, Comparator c)}
+ * instead.
  * @author Sunita Mani
  */
-
-package sun.misc;
-
+@Deprecated
 public class Sort {
 
     private static void swap(Object arr[], int i, int j) {
         Object tmp;
 

@@ -45,12 +48,13 @@
     /**
      * quicksort the array of objects.
      *
      * @param arr[] - an array of objects
      * @param left - the start index - from where to begin sorting
-     * @param right - the last index.
-     * @param comp - an object that implemnts the Compare interface to resolve thecomparison.
+     * @param right - the last index (inclusive).
+     * @param comp - an object that implements the Compare interface to resolve
+     * the comparison.
      */
     public static void quicksort(Object arr[], int left, int right, Compare comp) {
         int i, last;
 
         if (left >= right) { /* do nothing if array contains fewer than two */