Java tutorial
//package com.java2s; import java.util.Collections; import java.util.List; public class Main { /** * Sort * * @param list * List{T} * @return List{T} */ public static <T extends Comparable<? super T>> List<T> sort(List<T> list) { if (list == null) { return null; } Collections.sort(list); return list; } }