In this lecture, we discuss why Java gained lambda expressions: conciseness and readability, passing behavior as a parameter, integration with collections and the
Stream API (
filter,
map,
forEach), capture of “effectively”
final variables, and convenient callback syntax via the
-> operator. In parallel, we’ll look at pitfalls: debugging long chains, overload ambiguity (
Runnable vs
Callable), closure limitations, serialization, and nested lambdas. We conclude with practical recommendations on when to use lambdas and a review of common mistakes.