public static void main(String[] args) {
   SlowSet<String> slowSet = new SlowSet<>();
   slowSet.addAll(Countries.names(10));
   slowSet.addAll(Countries.names(10));
   slowSet.addAll(Countries.names(10));
   print(slowSet);
   slowSet.removeAll(Countries.names(10));
   print(slowSet);
 }
Beispiel #2
0
 public static void main(String args[]) {
   List ls = new ArrayList<String>(Countries.names(10));
   Collections.sort(ls);
   Print.print(ls);
   Collections.shuffle(ls);
   Print.print("after sort");
   Print.print(ls);
 }