本帖最后由 闫玉泉 于 2012-2-29 08:15 编辑
public class Person {
private String name;
private int age;
public String getName() {
return name;
}
public int getAge() {
return age;
}
public void setName(String name) {
this.name = name;
}
public void setAge(int age) {
this.age = age;
}
public Person(String name, int age) {
super(); (这一段代码不理解,是什么意思?父类的构造方法?)
this.name = name;
this.age = age;
}
public Person(){
}
}
|