A class is defined in the interior of an outer class. The class name does not need to be the same as the folder.
* Inner classes can be static, or public,default,protected and private adornments are available. (The external top-level class, which is the same as the class name and the file name, can only use public and default).
1. Non-static inner classes: perimeter classes and inner classes can access their own private members. static member variables cannot be defined in an inner class . 2. Static inner class: only static members of external classes can be accessed. 3, local inner class: The inner class does not have any access control permissions The outer class is invisible to the local inner class of the method, but the local inner class can access any member of the perimeter class. The local inner class can be accessed in the method body, but the access statement must be after the local inner class is defined. A local inner class can only access constants in the method body, that is, members that are decorated with a final decoration. 4. Anonymous inner class: There is no constructor, instead, the constructor parameter is passed to the Super class constructor.
Java Internal classes