public void speak(){
System.out.println("age="+age+","+"name+"+name);
}
}
class TextThis{
public static void main(String[] args){
Person p1=new Person("zhangsan",23);
Person p2=new Person("lisi",32);
p1.speak();
}
}
先总结到这里,this的引用代码还在练习中,不大熟悉等敲的形如流水了再发。多多谅解!