this 关键字代表当前对象:
封装对象的属性时,经常会使用this关键字;
eg:
package imooc;
public class Telephone{
private float screen;
private float cpu;
private float mem;
public float getScreen(){
return screen;
}
public void setScreen(float screen){
this.screen=screen;
}
}
原文:http://www.cnblogs.com/Doris9301/p/7457679.html