黑马程序员技术交流社区
标题:
this 区分成员变量和局部变量
[打印本页]
作者:
张恩祺
时间:
2015-7-5 23:53
标题:
this 区分成员变量和局部变量
package cn.itcast;
public class Student {
private String name;
private int age;
public Student() {
super();
}
public Student(String name, int age) {
super();
this.name = name;
this.age = age;
}
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;
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2