1.有一个无参的公共的构造方法
2.有属性
3.属性有对应的get和set存取方法
package ch3;
public class JavaBeanText {
private String name;
private int age;
public JavaBeanText() {}
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;
}
}