import java.util.*;
public class Set1{
static void fill(Set s){
s.addAll(Arrays.asList(
"one two three four five six seven".split("")));
}
public static void test(Set s){
System.out.println(
s.getClass().getName().replaceAll("\\w+\\.",""));
fill(s);fill(s);fill(s);
System.out.println(s);
s.addAll(s);
s.add("one");
s.add("one");
s.add("one");
System.out.println(s);
}
public static void main(String[] args){
test(new HashSet());
test(new TreeSet());
test(new LinkedHashSet());
}
}
对于以上运行的各个输出结果(println部分)麻烦给我做个详细的讲解我不理解
还有就是s.addAll(Arrays.asList(
"one two three four five six seven".split("")));
}
这行是什么意思~谢谢