直接用递归实现: import java.util.Arrays; import java.util.LinkedList; import java.util.List; /** * * @author lazy_p * @date 2010-9-1 * */ public class ZuheTest1 { static void listAll(List list, String prefix) { System.out.println(prefix); for (int i = 0; i < list.size(); ++i) { List temp = new LinkedList(list); listAll(temp, prefix + temp.remove(i)); } } public static void main(String[] args) { String[] ar = new String[] { "1", "2", "3" }; listAll(Arrays.asList(ar), ""); } } 输出结果: 112123131322212132323133131232321