本帖最后由 严海荣 于 2013-1-2 20:43 编辑
import java.util.*;
class bean{
private ArrayList list = new ArrayList();//这里可以这样么?
private String name ;//赋默认值 直接在这里吗String name="zhangsan";?
private int age;
public ArrayList getList() {
return list;
}
public void setList(ArrayList list) {
this.list = list;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
|