my变量有时也叫做词法变量,因为它们的作用域仅仅依赖于程序文本自身,不依赖于执行细节,例如以什么顺序来执行什么。
These 'my variables' are sometimes called' lexical 'because their scope depends only on the program text itself, and not on details of execution, such as what gets executed in what order.
内部类以及lambda表达式一个局限性是——它们只引用来自它们的词法作用域的最终(final)局部变量。
One limitation of inner classes - and lambda expressions too - is that they can only refer to final local variables from their lexical scope.
注意到,它能够引用词法作用域中的任何变量(本例中是 min)。
Observe that it can refer to any variable live in the lexical scope (in this example, min).
应用推荐