Here you can find the source of quickSort(String[] str, int low, int high)
public static void quickSort(String[] str, int low, int high)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.text.Collator; public class Main { public static Collator collator = Collator.getInstance(); public static void quickSort(String[] str, int low, int high) { if (low >= high) return; String pivot = str[low];//from w w w . j a v a 2 s .c o m int slow = low - 1, shigh = high + 1; while (true) { do shigh--; while (collator.compare(str[shigh], pivot) > 0); do slow++; while (collator.compare(pivot, str[slow]) > 0); if (slow >= shigh) break; String temp = str[slow]; str[slow] = str[shigh]; str[shigh] = temp; } quickSort(str, low, shigh); quickSort(str, shigh + 1, high); } }