Here you can find the source of sort(String a[])
public static void sort(String a[])
//package com.java2s; //License from project: Apache License public class Main { public static void sort(String a[]) { for (int i = 0; i < a.length - 1; i++) { for (int j = i + 1; j < a.length; j++) { if (a[j].compareTo(a[i]) < 0) { String temp = a[i]; a[i] = a[j];/*from w ww . ja va2s .c o m*/ a[j] = temp; } } } } }