import java.util.*;
public class TestBasic_collection{
public static void main(String[]args){
Collection c = new HashSet();
c.add("hello");
c.add(new Name1("1221", "11"));
c.add(new Integer(100));
System.out.println(c);
}
}class Name1{
 String firstName, lastName;
public Name1(String fristName, String lastName){
this.firstName = firstName;
this.lastName = lastName;
}

public String getFirstName(){
return firstName;
}
        public String getLastName(){
return lastName;
}

public String toString(){
return firstName + "  " +lastName ;
}
}输出:[hello, 100, null 11]可是这好像是错的, 应该输出的是:[hello, null 11, 100] 呀请大家 指教 指教