|NO.Z.00026|——————————|BigDataEnd|——|Java&方法封装.V08|——|Java.v08|this关键字.v02|工作原理|

一、this关键字工作原理
### --- this关键字工作原理

~~~     ——>        在构造方法中和成员方法中访问成员变量时,编译器会加上this.的前缀,
~~~     ——>        而this.相当于汉语中"我的",当不同的对象调用同一个方法时,
~~~     ——>        由于调用方法的对象不同导致this关键字不同,从而this.方式访问的结果也就随之不同。

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on 2022-04-03 17:37  yanqi_vip  阅读(24)  评论(0)    收藏  举报

导航