Here you can find the source of copyAndSort(String[] input)
Parameter | Description |
---|---|
input | to sort |
protected static String[] copyAndSort(String[] input)
//package com.java2s; /************************************************************************************** * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * **************************************************************************************/ import java.util.*; public class Main { /**/*from ww w .j a v a 2 s . c o m*/ * Copy an sort the input array. * @param input to sort * @return sorted copied array */ protected static String[] copyAndSort(String[] input) { String[] result = new String[input.length]; System.arraycopy(input, 0, result, 0, input.length); Arrays.sort(result); return result; } }