Here you can find the source of sortStringArrayAlphabetically(String[] strings)
public static void sortStringArrayAlphabetically(String[] strings)
//package com.java2s; //License from project: GNU General Public License public class Main { public static void sortStringArrayAlphabetically(String[] strings) { int j;//from w ww .ja v a 2 s.c o m boolean notDone = true; // will determine when the sort is finished String temp; while (notDone) { notDone = false; for (j = 0; j < strings.length - 1; j++) { if (strings[j].compareToIgnoreCase(strings[j + 1]) > 0) { // ascending sort temp = strings[j]; strings[j] = strings[j + 1]; // swapping strings[j + 1] = temp; notDone = true; } } } } }