首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

this关键字调用的具体差异

2011-12-03 
this关键字调用的具体区别我的意思是 加this和不加this的区别。[解决办法]比如一个构造方法;Java codeclass

this关键字调用的具体区别
我的意思是 加this和不加this的区别。

[解决办法]
比如一个构造方法;

Java code
class A {   private int a;    public A(int a) {         this.a = a;     }}class A {   private int a;    public A(int b) {         a= b;     }} 

热点排行