Quick notes on lambda expressions

Here are two resources on lambda expressions:

An article from Oracle
The article starts with some basic examples: sort functions, ActionListeners, and Runnables.
It goes on to do a longer application-level example. The example is programming a robocaller to call certain people from a database depending on their age/gender. I think it’s a good example to read through, and maybe copy code out of to watch the code in action.
An article from JavaWorld

The example here might be familiar from calculus: the author discusses a function

that estimates the integral of \(f\) from \(a\) to \(b\).
There’s a comparison to function pointers in C++. If that’s interesting to you, great! If it adds confusion, feel free to ignore the C++ part.
The article also goes into method references, which I don’t think were on the slides. But, method references are a nice syntactic addition, so if you end up programming a lot in Java, I’d encourage you to look into it.