creating the functional interface in java

Java
package com.concretepage;

@FunctionalInterface
public interface Calculator {
   long calculate(long num1, long num2);
} 
Source

Also in Java: