类人员{
私有字符串名称;
私有输入;
公共人员(string name,int age ) {
this.name=name;
this.age=age;
}
公共字符串获取名称
return name;
}
公共void set name (string name ) {
this.name=name;
}
公共获取页面() {
返回age;
}
公共语音设置(intage ) {
this.age=age;
}
}
公共类t {
Publicstaticvoidmain(string的高大星月args ) )。
//存储基本类型的字符串
Set set=new HashSet (;
set.add(a );
set.add(c );
set.add(b );
//*
Iterator ite=set.iterator (;
while(ite.Hasnext () ) ) ) ) ) ) )。
}
//*
for (stringstr 3360集) {
}
//保管对象
Set sets=new HashSet (;
sets.add(newPerson ) ' Zhangsan ',21 );
sets.add(newPerson('Lisi ',20 );
sets.add(newPerson ) ' Wangwu ',22 );
//*
Iterator i=sets.iterator (;
wile(I.Hasnext ) ) ) )。
人员人员=I.next (;
}
//*
个人人员:集{
}
}
}