Why does compiling a class containing static nested classes create a new .class file named “EnclosingClass$1”? [duplicate]
问题 This question already has answers here : Why is an anonymous inner class containing nothing generated from this code? (5 answers) Closed 4 years ago . In the below code : class EnclosingClass { public static class BiNode extends Sub.IBiLink { } private static class Sub { private static class IBiLink { } } } On compiling along with other .class files, I also see a file named "EnclosingClass$1.class" .Why has this been automatically created? Whats going on? 回答1: First have a look at the class