フリー問題

Java SE 8 Programmer II のフリー問題 9 / 20 問目

問題文

A lambda body declares a parameter whose name matches a local variable of the enclosing method. Why is that file turned away?

選択肢

  1. It is turned away because a lambda body keeps a copy of values seen at build time so its declarations are read just as they would be outside of it.
  2. It is turned away because a lambda body draws names from types it stands in for so its declarations are read just as they would be outside of it.
  3. It is turned away because a lambda body runs later than a surrounding block finishes so its declarations are read just as they would be outside of it.
  4. It is turned away because a lambda body shares a single naming layer with code that holds it so its declarations are read just as they would be outside of it.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。