深度复制
List<Integer> dest = new ArrayList<Integer>(Arrays.asList(new Integer[src.size()]));
Collections.copy(dest, src);
浅度复制
ArrayList<Integer> list2 = new ArrayList<Integer>();
list2.addAll(list1);
深度复制
List<Integer> dest = new ArrayList<Integer>(Arrays.asList(new Integer[src.size()]));
Collections.copy(dest, src);
浅度复制
ArrayList<Integer> list2 = new ArrayList<Integer>();
list2.addAll(list1);
转载于:https://my.oschina.net/wangwang110/blog/667179