Java Array Sort sort(String[] sArray)

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

Description

Ordena l'array indicat en ordre ascendent

License

Open Source License

Parameter

Parameter Description
sArray Array d'Strings a ordenar

Declaration

public static String[] sort(String[] sArray) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

public class Main {
    /**//from   w  w  w .jav a 2  s .c o m
     * Ordena l'array indicat en ordre ascendent
     * @param sArray Array d'Strings a ordenar
     * @return 
     */
    public static String[] sort(String[] sArray) {
        String[] sSort = null;
        if (sArray != null) {
            sSort = new String[sArray.length];
            System.arraycopy(sArray, 0, sSort, 0, sArray.length);
            Arrays.sort(sSort);
        }
        return sSort;
    }
}

Related

  1. sort(Object[] array, int start, int end)
  2. sort(Object[] array_, boolean accendingOrder_)
  3. sort(String a[])
  4. sort(String[] colnos)
  5. sort(String[] s)
  6. sort(String[] str)
  7. sort(String[] strArray)
  8. sort(String[] strArray)
  9. sort(T[] a, S[] a2)