Java Lambda Expression Basics

Java 8 introduced Lambda expressions. Lambda expressions are a shorthand for implementing single method interfaces. By a single method interface, I mean something like the following.

package com.tgenedavis.lambda;

public interface Flower {
	public void bloom();
}

The interface Flower has a single method called bloom(). Before Lambda expressions, we could implement single method interfaces with an anonymous class or with a normal class.

Continue reading “Java Lambda Expression Basics”