Here you can find the source of Sort(Collection
Parameter | Description |
---|---|
list | Collection to sort |
public static ArrayList<String> Sort(Collection<String> list)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; import java.util.Collections; public class Main { /** Convenience methods that makes it easier to sort a collection */*from www .j a v a 2 s . c o m*/ * @param list Collection to sort * @return Sorted list */ public static ArrayList<String> Sort(Collection<String> list) { ArrayList<String> newList = new ArrayList<String>(list); Collections.sort(newList); return newList; } }