Content deleted Content added
→JavaBean Example: Fixed datatype on getAge(), added no-argument constructor |
|||
Line 20:
private String name;
private int age;<BR>
public void PersonBean() {
// Our constructor. Note that it takes no arguments.
}<BR>
public void setName(String n) {
this.name = n;
Line 26 ⟶ 29:
this.age = a;
}<BR>
public String getName() { return (this.name); }
public
}
|