Assertion When the inner class accesses private members of the outer class, the compiler generates synthetic methods that are package private. The assertion is that these synthetic methods are available to any class from the same package, not just the inner classes of the class. Proof Create the following files. File synthetic/A.java public class A [...]
Assertion The Virtual Machine bluntly ignores the inner class statute of a class. The binary class file does not distinguish between usages of the inner class and usages of the non-inner class. Proof Create the following files. File inner/A.java public class A { public static class B { public static String name() { return “Inner [...]
Assertion Sun’s Java Virtual Machine ignores inner class access modifiers. All Sun’s virtual machine versions are affected. Proof Create the following files. File public/A.java public class A { public static class B { public static String name() { return “Public inner class”; } } } File private/A.java public class A { private static class B [...]