Hashset的使用及其方法
HashSet set = new HashSet();
System.out.println(set.add("john"));
System.out.println(set.add("lucy"));
System.out.println(set.add("john"));
System.out.println(set.add("jack"));
System.out.println(set.add("Rose"));
set.remove("john");
System.out.println("set=" + set);
set = new HashSet();
System.out.println("set=" + set);
set.add("lucy");
set.add("lucy");
set.add(new Dog("tom"));
set.add(new Dog("tom"));
System.out.println("set=" + set);
set.add(new String("hsp"));
set.add(new String("hsp"));
System.out.println("set=" + set);