Q. What is the default behavior of variables captured in lambdas?

  • (A) They must be mutable
  • (B) They must be final or effectively final
  • (C) They can be reassigned
  • (D) They are ignored
πŸ’¬ Discuss
βœ… Correct Answer: (B) They must be final or effectively final
Explanation: Captured variables in lambdas must be final or effectively final.
Explanation by: Mr. Dubey
Captured variables in lambdas must be final or effectively final.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
57
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate