Java Array Sort sortStringArray(String[] source)

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

Description

String sort method.

License

Open Source License

Parameter

Parameter Description
source the source array

Return

the sorted array (never null)

Declaration

public static String[] sortStringArray(String[] source) 

Method Source Code

//package com.java2s;

import java.util.Arrays;

public class Main {
    /**/* ww w . ja  v  a2 s.c  om*/
     * String sort method.
     * @param source the source array
     * @return the sorted array (never null)
     */
    public static String[] sortStringArray(String[] source) {
        if (source == null) {
            return new String[0];
        }
        Arrays.sort(source);
        return source;
    }
}

Related

  1. sortRetain(long[] a)
  2. sortReverseOrder(String[] strings)
  3. sortStringArray(String array[], boolean inplace)
  4. sortStringArray(String[] array)
  5. sortStringArray(String[] array)
  6. sortStringArrayAlphabetically(String[] strings)
  7. sortStrings(final String[] strings)
  8. sortStrings(String[] strings)
  9. sortStrings(String[] strings)