Overriding private methods in (non-)static classes
问题 I have this test code example: public class Test { private static class Test3 { private void print1() { System.out.println("1"); } } private static class Test4 extends Test3 { private void print1() { System.out.println("2"); } } public static void main(String[] args) { System.out.println("Overriden call to private method ----------------"); OuterTest.Test1 test1 = new OuterTest.Test1(); OuterTest.Test2 test2 = new OuterTest.Test2(); OuterTest.Test1 test12 = new OuterTest.Test2(); test1