The local inner class, which is placed in "{block}", is a local inner class that cannot be modified by the member modifier static, and the members of the inner class cannot be static.
Accessing the local variable "{block}" in the inner class requires that the local variable be declared final.
Members of external classes can be accessed directly because they also hold references in external classes.
However, you cannot access the variables in the block in which it resides, only the final decorated local variables (including the formal parameters).
Anonymous inner class
Premise: The inner class must inherit one or implement an interface. But all classes have a common base class Object, so when using anonymous classes, you can also not display the life of a base class (in fact, the base class itself exists)
Inner classes can also be saved with a base class and then called methods.
Java Inner class--local inner class