import java.util.ArrayList; import java.util.Iterator; public class StringSampleDemo { public static void main(String[] args) { ArrayList al = new ArrayList(); al.add(new Student("zhangsan1", 20, "男")); al.add(new Student("zhangsa
用递归进行排序 , 用TreeSet 去重. public class test { public static void main(String []args){ String str = "AVCV"; TreeSet set = new TreeSet(); List list = digui(str); System.out.println(list.size()); for(Object o :list){ set.add(o.toString()); } } public
方式一,使用for循环遍历去除List中的重复元素代码如下 public static void main(String[] args) { Test07 test07 = new Test07(); System.out.println(test07.getList()); } public List getList() { List originalList = new ArrayList(); originalList.add(1); originalList.add(3); origin