求这个JAVA程序 不要随便复制黏贴过来 都不一样 谢谢

2024-12-16 00:43:12
推荐回答(1个)
回答1:

class Person {
private String name;
private String sex;
private int age;
private List children;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public List getChildren() {
return children;
}
public void setChildren(List children) {
this.children = children;
}
}