Here you can find the source of sort(String[] sArray)
Parameter | Description |
---|---|
sArray | Array d'Strings a ordenar |
public static String[] sort(String[] sArray)
//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; } }