标签:shu ati ++ code for class slist stat div
public static void main(String[] args) { List <Integer> intList = new ArrayList<Integer>(); //汉字随机放入的位子 intList.add(1); intList.add(2); intList.add(3); intList.add(4); Collections.shuffle(intList); for (int i = 0; i < intList.size(); i++) { System.out.println(intList.get(i)); } System.out.println("-----------------"); Integer[] arr = new Integer[] {1, 2, 3, 4}; List<Integer> list = Arrays.asList(arr); Collections.shuffle(list); for (int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); } }
标签:shu ati ++ code for class slist stat div
原文地址:http://www.cnblogs.com/shihaiming/p/7680558.html