how to call a functional interface java code example
Example 1: creating the functional interface in java
package com.concretepage;
@FunctionalInterface
public interface Calculator {
long calculate(long num1, long num2);
}
Example 2: functional interface java
A functional interface is an interface that contains only one abstract method. They can have only one functionality to exhibit.