Java Array Sort sortStrings(String[] strings)

Here you can find the source of sortStrings(String[] strings)

Description

sort Strings

License

Open Source License

Declaration

public static void sortStrings(String[] strings) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

public class Main {
    public static void sortStrings(String[] strings) {
        // Just does a bubblesort.
        for (int i = 0; i < strings.length - 1; ++i) {
            for (int j = i + 1; j < strings.length; ++j) {
                if (strings[i].compareTo(strings[j]) > 0) {
                    String t = strings[i];

                    strings[i] = strings[j];
                    strings[j] = t;//from  w  ww .  j av  a  2  s  .  co m
                }
            }
        }
    }
}

Related

  1. sortStringArray(String[] array)
  2. sortStringArray(String[] source)
  3. sortStringArrayAlphabetically(String[] strings)
  4. sortStrings(final String[] strings)
  5. sortStrings(String[] strings)
  6. sortStrings(String[] strings)
  7. sortSubFiles(String[] p_subFiles)
  8. sortTable(String[][] data, int index)
  9. sortToFXYSumOrder(final double[] coeffs)