/Collections.sort(l);
//print(l);
}
public static void print(Collection c){
Iterator it = c.iterator();
while(it.hasNext()){
Object o = it.next();
System.out.println(o);
//print(l);
}
public static void print(Collection c){
Iterator it = c.iterator();
while(it.hasNext()){
Object o = it.next();
System.out.println(o);
Iterator it = c.iterator();//用迭代器Iterator循环遍历Collection c中的每一个元素
while(it.hasNext()){//如果c中还有元素
Object o = it.next();//把这个元素赋给Object型的变量o
System.out.println(o);//把这个元素输出//这段程序的作用就是打印集合c中的每一个元素