//this关键词/*调用类中的属性调用类中的方法或构造方法调用当前对象,调用自己的方法,可以省略。*///http://blog.sina.com.cn/s/blog_71f6c1980100wtj4.html//this指当前对象自己public class Google{ String s="hello"; public Google(String s){ System.out.println("1--->s:"+s);//指代全局 System.out.println("2--->this.s:"+this.s);//指向类的属性/方法 //this.s=s; //System.out.println("3--->this.s:"+this.s); } public static void main(String args[]){ new Google("hello world"); }}