关于java中this的一个最基本的小问题

public class test
{
private float height;
private float width;
public test(float height,float width)
{
this.height=height;
this.width=width;
}
public float square(){
return height*width;
}
public static void main(String args[]){
test u=new test(3.5f,4.5f);
System.out.println(u.square());
}
}

我没学过this,,看书好深奥.....
这个this是不是把3.5f和435f赋值给了class test中的两个private的.....
还是别的什么意思...?
就是说这个this的原理是啥?简单解释一下就好...让我有一点大体的框架

就是给自己的两个成员变量赋值了而已。
因为参数名字和成员变量的名字重复了,所以用this区分一下。
温馨提示:答案为网友推荐,仅供参考
相似回答