编程开发之--Java集合类继承与实现必备知识

1、LinkedHashSet有序链式集合

  举例:

long startTime=System.currentTimeMillis();
LinkedHashSet oprTypeSet = new LinkedHashSet();
for(String it : arr) {
    oprTypeSet.add(it);
}
Iterator it=oprTypeSet.iterator();
while(it.hasNext()) {
     System.out.println((String)it.next());
}
long endTime=System.currentTimeMillis();
System.out.println("cost---:"+(endTime1-startTime1));

猜你喜欢

转载自www.cnblogs.com/ZeroMZ/p/9249278.html