What are synthetic fields in Java? [duplicate]
问题 This question already has answers here : What is the meaning of “static synthetic”? (3 answers) Closed 6 years ago . Can someone explain in an easy to understand way the importance of synthetic fields in Java. I recall reading it in context of non static inner classes where each such inner class instance maintains a reference to the enclosing class. Why are such references/fields called synthetic fields? 回答1: A synthetic field is a compiler-created field that links a local inner class to a