Implementing Runnables the Lambda Way

Java 8 introduced Lambda expressions. We’ve been told they would bring simpler easier-to-read programs. We’ve been told that Lambda expressions create multi-core friendly code. Functional programs created with Lambda expressions have fewer bugs, saving development time and maintenance costs. Rumor has it that the release of Java 8 was the moment when the rise of the oceans began to slow and our planet began to heal; it was the moment when we ended all language wars and secured Java’s image as the last, best hope on Earth.

I’m not saying it’s all true. That’s just what I’ve heard.

To decipher rumor from truth, we need to start with some basics. There is a lot of complex, albeit cool, stuff that the experts can do with Lambda expressions. We’ll start with a basic tutorial on how to use a Lambda expression to implement a Runnable.

Continue reading “Implementing Runnables the Lambda Way”