Here you can find the source of sortStringList(List
public static List<String> sortStringList(List<String> l, boolean ascending)
//package com.java2s; /**************************************************************************** * Copyright (c) 2008-2011 Matthew Ballance and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w w w .ja v a 2 s. c o m * Matthew Ballance - initial implementation ****************************************************************************/ import java.util.ArrayList; import java.util.List; public class Main { public static List<String> sortStringList(List<String> l, boolean ascending) { List<String> ret = new ArrayList<String>(); ret.addAll(l); return ret; } }