import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import Sutends.Sutends_ustn;
public class tset {
public static void main(String[] args) {
Collection c =new ArrayList();
Sutends_ustn z=new Sutends_ustn();
z.setName("张二");
z.setAge(39);
z.setName("张三");
z.setAge(40);
z.setName("张四");
z.setAge(21);
c.add(z.getAge());
c.add(z.getName());
c.add(z);
c.add(z);
// z.contains("ketang");
Iterator it=c.iterator();
//Object Obj=it.next();
while (it.hasNext()){
System.out.println(it.next());
}
//System.out.println(z.contains("ketang"));
}
}
|
|