Java 8: What is a Functional Interface? - DevDummy


Development Guide for Dummies, Simple Tech Guides, Shared ...

Monday, October 09, 2017

Java 8: What is a Functional Interface?

Functional Interfaces, What is that, seriously, in Java?

Functional Interface is a new concept introduced from Java 8 which are more focused to towards the new features like Lambda Expressions.

What is a Functional Interface?

Functional Interface is an interface which has one and only one abstract method. These interfaces are also called SAM (Single Abstract Method) Interfaces. Java API contain several Functional Interfaces like Comparable, Runnable and etc.


Functional Interface can have one and only one abstract method but one or more default methods.

Default Methods ?

In java 8, it is possible to have default methods which contains a default implementation which ensures the consistency of the interface when required.


Image Credit :

No comments:

Post a Comment