inner class access to outer class method, same method names
i got a class and a subclass 01 public class A{ 02 void test(){}; 03 public class B{ 04 void test(){ 05 test(); 06 } 07 } 08 } Ok, in line 05 id like to access the method test of class A. But i go into a loop because i dont know how to specify to use the method of class A. Any ideas? 01 public class A{ 02 void test(){}; 03 public class B{ 04 void test(){ 05 test(); // local B.test() method, so recursion, use A.this.test(); 06 } 07 } 08 } EDIT : As @Thilo mentioned : Avoid using same method names in outer class and inner class, this will avoid naming conflicts. You can do something like that :