CODE: public class A {
String s = "Hello"; public A(String s) { System.out.println("s = " + s); System.out.println("1 -> this.s = " + this.s); this.s = s; System.out.println("2 -> this.s = " + this.s); } public static void main(String[] args) { new A("HelloWorld!"); } } 标题名称:浅谈Java中this的使用(转) 当前网址:http://kswsj.com/article/jjjhdp.html
Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号 |