Functional interface and Lambda expressions in Java

Photo by Killian Cartignies on Unsplash

Functional Interface

It is an interface that contains only one abstract method. A method with nobody is called an abstract method. It means that if an interface has exactly one method that is not defined, it is a functional interface.

Lambda Expressions

Lambda expression is an instance of Functional Interface. It enables passing code as data (Functional programming concept) and also creates functions without the need for them to belong to a class.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store