this.成员变量:目前类的变量,this.方法:当前运行类的方法

this.成员变量:当前类的变量,this.方法:当前运行类的方法!public class Test {void test() {this.test1()

this.成员变量:当前类的变量,this.方法:当前运行类的方法!


public class Test {
   void test() {
  this.test1();
   }
   void test1() {
  System.out.println("test");
   }

}




public class Test1  extends Test{
  void test1() {
 System.out.println("err");
  }
  public static void main(String[] args) {
Test1 t=new Test1();
t.test();
}
}


结果是:err  

去掉this,结果也是err