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://cxhlcq.com/article/jjjhdp.html 其他资讯 |