如题所述
public class Address {
private String name;
private String email;
public void display(){
System.out.println("姓名:"+this.getName()+" email:"+this.getEmail());
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
private String name;
private String email;
public void display(){
System.out.println("姓名:"+this.getName()+" email:"+this.getEmail());
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
温馨提示:答案为网友推荐,仅供参考