Functional interface in java8.

Interface is the one which has only abstract methods. It has only declaration. It implements the concept of abstraction. Functional interfaces are important concept in java 8. What is functional interface?? Functional interface has only one abstract method. This uses lambda expressions to implement the method. Built in package: java.util.function Common functional interfaces: The below functional interfaces are commonly used from java SE1.8 onwards. ActionListener, Runnable, Callable, Comparable. Simple program to implement functional interface using Runnable: class Test { public static void main(String args[]) { Runnable runnable = () -> System.out.println("A threat is running separately"); new Thread(runnable).start(); ...