A

Admin • 825.56K Points
Coach

Q. What is captured from the enclosing scope in a lambda expression?

  • (A) Local variables only if they are final or effectively final
  • (B) All variables regardless of finality
  • (C) Class variables only
  • (D) No variables are captured

Explanation by: Admin
Lambdas can capture variables from the enclosing scope if they are final or effectively final.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.