java 中 this的使用
摘要:这是在构造函数里用的this 这个this的作用主要是对 作为对象的一个指针作用,指向该对象,如调用构造函数的时候 this.i = i;//如果不添加this 就会直接输出成员变量的值 this i 表示这个新实例化的对象的指针,this.i 表示的是这个对象的属性i 如果不添加this 这个最终
阅读全文
posted @ 2019-04-20 22:06
posted @ 2019-04-20 22:06
posted @ 2019-04-17 17:22
posted @ 2019-04-17 11:13