Java examples for java.util:List Sort
sort List of Integer
//package com.java2s; import java.util.Collections; import java.util.LinkedList; import java.util.List; public class Main { public static void main(String[] argv) { List aList = java.util.Arrays.asList("asdf", "java2s.com"); System.out.println(sort(aList)); }//w w w . java 2s . c om public static List<Integer> sort(List<Integer> aList) { List<Integer> tmp = new LinkedList<>(aList); Collections.sort(tmp); return tmp; } }